Skip to content
  1. Feb 09, 2006
  2. Feb 08, 2006
    • Chris Lattner's avatar
      Compile this: · a10e23c1
      Chris Lattner authored
              xori r6, r2, 1
              rlwinm r6, r6, 0, 31, 31
              cmpwi cr0, r6, 0
              bne cr0, LBB1_3 ; endif
      
      to this:
      
              rlwinm r6, r2, 0, 31, 31
              cmpwi cr0, r6, 0
              beq cr0, LBB1_3 ; endif
      
      llvm-svn: 26047
      a10e23c1
  3. Feb 06, 2006
  4. Feb 05, 2006
  5. Feb 04, 2006
  6. Feb 03, 2006
  7. Feb 02, 2006
    • Chris Lattner's avatar
      Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo,a far... · bb53acd0
      Chris Lattner authored
      Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo,a far more logical place.  Other methods should also be moved if anyoneis interested. :)
      
      llvm-svn: 25913
      bb53acd0
    • Chris Lattner's avatar
      Turn any_extend nodes into zero_extend nodes when it allows us to remove an · 49beaf40
      Chris Lattner authored
      and instruction.  This allows us to compile stuff like this:
      
      bool %X(int %X) {
              %Y = add int %X, 14
              %Z = setne int %Y, 12345
              ret bool %Z
      }
      
      to this:
      
      _X:
              cmpl $12331, 4(%esp)
              setne %al
              movzbl %al, %eax
              ret
      
      instead of this:
      
      _X:
              cmpl $12331, 4(%esp)
              setne %al
              movzbl %al, %eax
              andl $1, %eax
              ret
      
      This occurs quite a bit with the X86 backend.  For example, 25 times in
      lambda, 30 times in 177.mesa, 14 times in galgel,  70 times in fma3d,
      25 times in vpr, several hundred times in gcc, ~45 times in crafty,
      ~60 times in parser, ~140 times in eon, 110 times in perlbmk, 55 on gap,
      16 times on bzip2, 14 times on twolf, and 1-2 times in many other SPEC2K
      programs.
      
      llvm-svn: 25901
      49beaf40
    • Chris Lattner's avatar
      add two dag combines: · 49ce3554
      Chris Lattner authored
      (C1-X) == C2 --> X == C1-C2
      (X+C1) == C2 --> X == C2-C1
      
      This allows us to compile this:
      
      bool %X(int %X) {
              %Y = add int %X, 14
              %Z = setne int %Y, 12345
              ret bool %Z
      }
      
      into this:
      
      _X:
              cmpl $12331, 4(%esp)
              setne %al
              movzbl %al, %eax
              andl $1, %eax
              ret
      
      not this:
      
      _X:
              movl $14, %eax
              addl 4(%esp), %eax
              cmpl $12345, %eax
              setne %al
              movzbl %al, %eax
              andl $1, %eax
              ret
      
      Testcase here: Regression/CodeGen/X86/compare-add.ll
      
      nukage of the and coming up next.
      
      llvm-svn: 25898
      49ce3554
    • Chris Lattner's avatar
      make -debug output less newliney · 0bd74558
      Chris Lattner authored
      llvm-svn: 25895
      0bd74558
    • Chris Lattner's avatar
      Implement matching constraints. We can now say things like this: · 7f5880b1
      Chris Lattner authored
      %C = call int asm "xyz $0, $1, $2, $3", "=r,r,r,0"(int %A, int %B, int 4)
      
      and get:
      
      xyz r2, r3, r4, r2
      
      note that the r2's are pinned together.  Yaay for 2-address instructions.
      
      2342 ----------------------------------------------------------------------
      
      llvm-svn: 25893
      7f5880b1
  8. Feb 01, 2006
    • Chris Lattner's avatar
      Implement smart printing of inline asm strings, handling variants and · aa23fa9f
      Chris Lattner authored
      substituted operands.  For this testcase:
      
      int %test(int %A, int %B) {
        %C = call int asm "xyz $0, $1, $2", "=r,r,r"(int %A, int %B)
        ret int %C
      }
      
      we now emit:
      
      _test:
              or r2, r3, r3
              or r3, r4, r4
              xyz r2, r2, r3  ;; look here
              or r3, r2, r2
              blr
      
      ... note the substituted operands. :)
      
      llvm-svn: 25886
      aa23fa9f
Loading