Skip to content
  1. Jan 19, 2005
    • Chris Lattner's avatar
      d54845f5
    • Chris Lattner's avatar
      Teach the code generator that shrd/shld is commutable if it has an immediate. · 29478017
      Chris Lattner authored
      This allows us to generate this:
      
      foo:
              mov %EAX, DWORD PTR [%ESP + 4]
              mov %EDX, DWORD PTR [%ESP + 8]
              shld %EDX, %EDX, 2
              shl %EAX, 2
              ret
      
      instead of this:
      
      foo:
              mov %EAX, DWORD PTR [%ESP + 4]
              mov %ECX, DWORD PTR [%ESP + 8]
              mov %EDX, %EAX
              shrd %EDX, %ECX, 30
              shl %EAX, 2
              ret
      
      Note the magically transmogrifying immediate.
      
      llvm-svn: 19686
      29478017
    • Chris Lattner's avatar
      Codegen long >> 2 to this: · 41fe201b
      Chris Lattner authored
      foo:
              mov %EAX, DWORD PTR [%ESP + 4]
              mov %EDX, DWORD PTR [%ESP + 8]
              shrd %EAX, %EDX, 2
              sar %EDX, 2
              ret
      
      instead of this:
      
      test1:
              mov %ECX, DWORD PTR [%ESP + 4]
              shr %ECX, 2
              mov %EDX, DWORD PTR [%ESP + 8]
              mov %EAX, %EDX
              shl %EAX, 30
              or %EAX, %ECX
              sar %EDX, 2
              ret
      
      and long << 2 to this:
      
      foo:
              mov %EAX, DWORD PTR [%ESP + 4]
              mov %ECX, DWORD PTR [%ESP + 8]
      ***     mov %EDX, %EAX
              shrd %EDX, %ECX, 30
              shl %EAX, 2
              ret
      
      instead of this:
      
      foo:
              mov %EAX, DWORD PTR [%ESP + 4]
              mov %ECX, %EAX
              shr %ECX, 30
              mov %EDX, DWORD PTR [%ESP + 8]
              shl %EDX, 2
              or %EDX, %ECX
              shl %EAX, 2
              ret
      
      The extra copy (marked ***) can be eliminated when I teach the code generator
      that shrd32rri8 is really commutative.
      
      llvm-svn: 19681
      41fe201b
    • Chris Lattner's avatar
      X86 shifts mask the amount. · d8d30660
      Chris Lattner authored
      llvm-svn: 19678
      d8d30660
  2. Jan 18, 2005
  3. Jan 17, 2005
  4. Jan 16, 2005
    • Chris Lattner's avatar
      * Adjust to changes in TargetLowering interfaces. · b14a63aa
      Chris Lattner authored
      * Remove custom promotion for bool and byte select ops.  Legalize now
        promotes them for us.
      * Allow folding ConstantPoolIndexes into EXTLOAD's, useful for float immediates.
      * Declare which operations are not supported better.
      * Add some hacky code for TRUNCSTORE to pretend that we have truncstore
        for i16 types.  This is useful for testing promotion code because I can
        just remove 16-bit registers all together and verify that programs work.
      
      llvm-svn: 19614
      b14a63aa
  5. Jan 15, 2005
  6. Jan 14, 2005
  7. Jan 13, 2005
  8. Jan 12, 2005
Loading