Skip to content
  1. Apr 06, 2009
  2. Apr 04, 2009
  3. Apr 03, 2009
  4. Apr 02, 2009
  5. Apr 01, 2009
  6. Mar 31, 2009
    • Evan Cheng's avatar
      Throttle back "fold select into operand" transformation. InstCombine should... · 826b6f0f
      Evan Cheng authored
      Throttle back "fold select into operand" transformation. InstCombine should not generate selects of two constants unless they are selects of 0 and 1.
      
      e.g.
      define i32 @t1(i32 %c, i32 %x) nounwind {
             %t1 = icmp eq i32 %c, 0
             %t2 = lshr i32 %x, 18
             %t3 = select i1 %t1, i32 %t2, i32 %x
             ret i32 %t3
      }
      
      was turned into
      
      define i32 @t2(i32 %c, i32 %x) nounwind {
             %t1 = icmp eq i32 %c, 0
             %t2 = select i1 %t1, i32 18, i32 0
             %t3 = lshr i32 %x, %t2
             ret i32 %t3
      }
      
      For most targets, that means materializing two constants and then a select. e.g. On x86-64
      
      movl    %esi, %eax
      shrl    $18, %eax
      testl   %edi, %edi
      cmovne  %esi, %eax
      ret
      
      =>
      
      xorl    %eax, %eax
      testl   %edi, %edi
      movl    $18, %ecx
      cmovne  %eax, %ecx
      movl    %esi, %eax
      shrl    %cl, %eax
      ret
      
      Also, the optimizer and codegen can reason about shl / and / add, etc. by a constant. This optimization will hinder optimizations using ComputeMaskedBits.
      
      llvm-svn: 68142
      826b6f0f
    • Evan Cheng's avatar
      Fully general expansion of integer shift of any size. · 0d551591
      Evan Cheng authored
      llvm-svn: 68134
      0d551591
    • Evan Cheng's avatar
      i128 shift libcalls are not available on x86. · d9d6e427
      Evan Cheng authored
      llvm-svn: 68133
      d9d6e427
    • Dan Gohman's avatar
      Reapply 68073, with fixes. EH Landing-pad basic blocks are not · 6b42dfdd
      Dan Gohman authored
      entered via fall-through. Don't miss fallthroughs from blocks
      terminated by conditional branches. Also, move
      isOnlyReachableByFallthrough out of line.
      
      llvm-svn: 68129
      6b42dfdd
    • Devang Patel's avatar
      Update call graph after inlining invoke. · 4ce6e690
      Devang Patel authored
      Patch by Jay Foad.
      
      llvm-svn: 68120
      4ce6e690
    • Daniel Dunbar's avatar
      Add llvm::sys::getHostTriple and remove · fb1a6eb6
      Daniel Dunbar authored
      llvm::sys::getOS{Name,Version}.
      
      Right now the implementation just derives from LLVM_HOSTTRIPLE (which
      is wrong, but it doesn't look like we have a define for the target
      triple). Ideally this routine would actually be able to compute the
      triple for targets we care about.
      
      llvm-svn: 68118
      fb1a6eb6
Loading