Skip to content
  1. Jan 02, 2005
    • Chris Lattner's avatar
      Two changes here: · 295e45e6
      Chris Lattner authored
      1. Add new instructions for checking parity flags: JP, JNP, SETP, SETNP.
      2. Set the isCommutable and isPromotableTo3Address bits on several
         instructions.
      
      llvm-svn: 19246
      295e45e6
  2. Dec 17, 2004
  3. Dec 16, 2004
  4. Dec 13, 2004
  5. Dec 12, 2004
  6. Dec 03, 2004
  7. Dec 02, 2004
  8. Dec 01, 2004
  9. Nov 29, 2004
    • Chris Lattner's avatar
      Revamp long/ulong comparisons to use a much more efficient sequence (thanks · f9c5dc9f
      Chris Lattner authored
      to Brian and the Sun compiler for pointing out that the obvious works :)
      
      This also enables folding all long comparisons into setcc and branch
      instructions: before we could only do == and !=
      
      For example, for:
      void test(unsigned long long A, unsigned long long B) {
         if (A < B) foo();
       }
      
      We now generate:
      
      test:
              subl $4, %esp
              movl %esi, (%esp)
              movl 8(%esp), %eax
              movl 12(%esp), %ecx
              movl 16(%esp), %edx
              movl 20(%esp), %esi
              subl %edx, %eax
              sbbl %esi, %ecx
              jae .LBBtest_2  # UnifiedReturnBlock
      .LBBtest_1:     # then
              call foo
              movl (%esp), %esi
              addl $4, %esp
              ret
      .LBBtest_2:     # UnifiedReturnBlock
              movl (%esp), %esi
              addl $4, %esp
              ret
      
      Instead of:
      
      test:
              subl $12, %esp
              movl %esi, 8(%esp)
              movl %ebx, 4(%esp)
              movl 16(%esp), %eax
              movl 20(%esp), %ecx
              movl 24(%esp), %edx
              movl 28(%esp), %esi
              cmpl %edx, %eax
              setb %al
              cmpl %esi, %ecx
              setb %bl
              cmove %ax, %bx
              testb %bl, %bl
              je .LBBtest_2   # UnifiedReturnBlock
      .LBBtest_1:     # then
              call foo
              movl 4(%esp), %ebx
              movl 8(%esp), %esi
              addl $12, %esp
              ret
      .LBBtest_2:     # UnifiedReturnBlock
              movl 4(%esp), %ebx
              movl 8(%esp), %esi
              addl $12, %esp
              ret
      
      llvm-svn: 18330
      f9c5dc9f
  10. Nov 22, 2004
  11. Nov 21, 2004
  12. Nov 19, 2004
  13. Nov 16, 2004
  14. Nov 14, 2004
  15. Nov 13, 2004
    • Chris Lattner's avatar
      · 049d33a7
      Chris Lattner authored
      shld is a very high latency operation. Instead of emitting it for shifts of
      two or three, open code the equivalent operation which is faster on athlon
      and P4 (by a substantial margin).
      
      For example, instead of compiling this:
      
      long long X2(long long Y) { return Y << 2; }
      
      to:
      
      X3_2:
              movl 4(%esp), %eax
              movl 8(%esp), %edx
              shldl $2, %eax, %edx
              shll $2, %eax
              ret
      
      Compile it to:
      
      X2:
              movl 4(%esp), %eax
              movl 8(%esp), %ecx
              movl %eax, %edx
              shrl $30, %edx
              leal (%edx,%ecx,4), %edx
              shll $2, %eax
              ret
      
      Likewise, for << 3, compile to:
      
      X3:
              movl 4(%esp), %eax
              movl 8(%esp), %ecx
              movl %eax, %edx
              shrl $29, %edx
              leal (%edx,%ecx,8), %edx
              shll $3, %eax
              ret
      
      This matches icc, except that icc open codes the shifts as adds on the P4.
      
      llvm-svn: 17707
      049d33a7
    • Chris Lattner's avatar
      Add missing check · ef6bd92a
      Chris Lattner authored
      llvm-svn: 17706
      ef6bd92a
    • Chris Lattner's avatar
      Compile: · 8d521bb1
      Chris Lattner authored
      long long X3_2(long long Y) { return Y+Y; }
      int X(int Y) { return Y+Y; }
      
      into:
      
      X3_2:
              movl 4(%esp), %eax
              movl 8(%esp), %edx
              addl %eax, %eax
              adcl %edx, %edx
              ret
      X:
              movl 4(%esp), %eax
              addl %eax, %eax
              ret
      
      instead of:
      
      X3_2:
              movl 4(%esp), %eax
              movl 8(%esp), %edx
              shldl $1, %eax, %edx
              shll $1, %eax
              ret
      
      X:
              movl 4(%esp), %eax
              shll $1, %eax
              ret
      
      llvm-svn: 17705
      8d521bb1
  16. Nov 10, 2004
  17. Nov 05, 2004
  18. Nov 02, 2004
  19. Nov 01, 2004
  20. Oct 28, 2004
  21. Oct 22, 2004
  22. Oct 19, 2004
Loading