Skip to content
  1. Jan 09, 2018
  2. Jan 03, 2018
  3. Nov 07, 2017
  4. Nov 06, 2017
  5. Aug 15, 2017
    • Amjad Aboud's avatar
      [InstCombine] Added support for (X >>s C) << C --> X & (-1 << C) · 0464c5d9
      Amjad Aboud authored
      Differential Revision: https://reviews.llvm.org/D36743
      
      llvm-svn: 310949
      0464c5d9
    • Sanjay Patel's avatar
      [InstCombine] sink sext after ashr · f69b7d5c
      Sanjay Patel authored
      Narrow ops are better for bit-tracking, and in the case of vectors,
      may enable better codegen.
      
      As the trunc test shows, this can allow follow-on simplifications.
      
      There's a block of code in visitTrunc that deals with shifted ops
      with FIXME comments. It may be possible to remove some of that now,
      but I want to make sure there are no problems with this step first.
      
      http://rise4fun.com/Alive/Y3a
      
      Name: hoist_ashr_ahead_of_sext_1
        %s = sext i8 %x to i32
        %r = ashr i32 %s, 3  ; shift value is < than source bit width
        =>
        %a = ashr i8 %x, 3
        %r = sext i8 %a to i32
        
      Name: hoist_ashr_ahead_of_sext_2
        %s = sext i8 %x to i32
        %r = ashr i32 %s, 8  ; shift value is >= than source bit width
        =>
        %a = ashr i8 %x, 7   ; so clamp this shift value
        %r = sext i8 %a to i32
        
      Name: junc_the_trunc  
        %a = sext i16 %v to i32
        %s = ashr i32 %a, 18
        %t = trunc i32 %s to i16
        =>
        %t = ashr i16 %v, 15
      llvm-svn: 310942
      f69b7d5c
  6. Aug 08, 2017
  7. Aug 05, 2017
  8. Aug 04, 2017
  9. Jul 08, 2017
    • Craig Topper's avatar
      [InstCombine] Make InstCombine's IRBuilder be passed by reference everywhere · bb4069e4
      Craig Topper authored
      Previously the InstCombiner class contained a pointer to an IR builder that had been passed to the constructor. Sometimes this would be passed to helper functions as either a pointer or the pointer would be dereferenced to be passed by reference.
      
      This patch makes it a reference everywhere including the InstCombiner class itself so there is more inconsistency. This a large, but mechanical patch. I've done very minimal formatting changes on it despite what clang-format wanted to do.
      
      llvm-svn: 307451
      bb4069e4
  10. Jun 24, 2017
  11. Jun 12, 2017
  12. Jun 09, 2017
  13. Jun 07, 2017
    • Sanjay Patel's avatar
      [InstCombine] fold lshr (sext X), C1 --> zext (lshr X, C2) · 66f7fdb3
      Sanjay Patel authored
      This was discussed in D33338. We have larger pattern-matching ending in a truncate that 
      we can reduce or remove by handling these smaller patterns first. Further motivation is 
      that narrower shift ops are easier for value tracking and zext is better than sext.
      
      http://rise4fun.com/Alive/rhh
      
      Name: boolshift
      %sext = sext i1 %x to i8
      %r = lshr i8 %sext, 7
      
      =>
      
      %r = zext i1 %x to i8
      
      Name: noboolshift
      %sext = sext i3 %x to i8
      %r = lshr i8 %sext, 7
      
      =>
      
      %sh = lshr i3 %x, 2
      %r = zext i3 %sh to i8
      
      Differential Revision: https://reviews.llvm.org/D33879
      
      llvm-svn: 304939
      66f7fdb3
  14. May 26, 2017
  15. Apr 26, 2017
  16. Apr 20, 2017
  17. Apr 18, 2017
  18. Feb 10, 2017
  19. Feb 01, 2017
    • Sanjay Patel's avatar
      [InstCombine] move folds for shift-shift pairs; NFCI · c56d1ccd
      Sanjay Patel authored
      Although this is 'no-functional-change-intended', I'm adding tests
      for shl-shl and lshr-lshr pairs because there is no existing test 
      coverage for those folds.
      
      It seems like we should be able to remove some code from foldShiftedShift()
      at this point because we're handling those patterns on the general path.
      
      llvm-svn: 293814
      c56d1ccd
  20. Jan 31, 2017
  21. Jan 30, 2017
  22. Jan 29, 2017
  23. Jan 26, 2017
  24. Jan 21, 2017
  25. Jan 17, 2017
  26. Jan 16, 2017
  27. Jan 15, 2017
Loading