Skip to content
  1. Oct 03, 2006
  2. Oct 02, 2006
  3. Sep 29, 2006
  4. Sep 28, 2006
  5. Sep 27, 2006
  6. Sep 26, 2006
  7. Sep 25, 2006
  8. Sep 24, 2006
  9. Sep 21, 2006
  10. Sep 20, 2006
    • Chris Lattner's avatar
      Compile: · c8cd62d3
      Chris Lattner authored
      int test3(int a, int b) { return (a < 0) ? a : 0; }
      
      to:
      
      _test3:
              srawi r2, r3, 31
              and r3, r2, r3
              blr
      
      instead of:
      
      _test3:
              cmpwi cr0, r3, 1
              li r2, 0
              blt cr0, LBB2_2 ;entry
      LBB2_1: ;entry
              mr r3, r2
      LBB2_2: ;entry
              blr
      
      
      This implements: PowerPC/select_lt0.ll:seli32_a_a
      
      llvm-svn: 30517
      c8cd62d3
    • Chris Lattner's avatar
      Fold the full generality of (any_extend (truncate x)) · 8746e2cd
      Chris Lattner authored
      llvm-svn: 30514
      8746e2cd
    • Chris Lattner's avatar
      Two things: · 8b68decb
      Chris Lattner authored
      1. teach SimplifySetCC that '(srl (ctlz x), 5) == 0' is really x != 0.
      2. Teach visitSELECT_CC to use SimplifySetCC instead of calling it and
         ignoring the result.  This allows us to compile:
      
      bool %test(ulong %x) {
        %tmp = setlt ulong %x, 4294967296
        ret bool %tmp
      }
      
      to:
      
      _test:
              cntlzw r2, r3
              cmplwi cr0, r3, 1
              srwi r2, r2, 5
              li r3, 0
              beq cr0, LBB1_2 ;
      LBB1_1: ;
              mr r3, r2
      LBB1_2: ;
              blr
      
      instead of:
      
      _test:
              addi r2, r3, -1
              cntlzw r2, r2
              cntlzw r3, r3
              srwi r2, r2, 5
              cmplwi cr0, r2, 0
              srwi r2, r3, 5
              li r3, 0
              bne cr0, LBB1_2 ;
      LBB1_1: ;
              mr r3, r2
      LBB1_2: ;
              blr
      
      This isn't wonderful, but it's an improvement.
      
      llvm-svn: 30513
      8b68decb
Loading