Skip to content
  1. Jan 19, 2005
    • Chris Lattner's avatar
      Finegrainify namespacification · f6932b70
      Chris Lattner authored
      Add default impl of commuteInstruction
      Add notes about ugly V9 code.
      
      llvm-svn: 19684
      f6932b70
    • 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
      Implement a way of expanding shifts. This applies to targets that offer · 2a7f8a94
      Chris Lattner authored
      select operations or to shifts that are by a constant.  This automatically
      implements (with no special code) all of the special cases for shift by 32,
      shift by < 32 and shift by > 32.
      
      llvm-svn: 19679
      2a7f8a94
    • Chris Lattner's avatar
      X86 shifts mask the amount. · d8d30660
      Chris Lattner authored
      llvm-svn: 19678
      d8d30660
    • Chris Lattner's avatar
      Add a hook to find out how the target handles shift amounts that are out of · a05cd83d
      Chris Lattner authored
      range.  Either they are undefined (the default), they mask the shift amount
      to the size of the register (X86, Alpha, etc), or they extend the shift (PPC).
      
      This defaults to undefined, which is conservatively correct.
      
      llvm-svn: 19677
      a05cd83d
  2. Jan 18, 2005
  3. Jan 17, 2005
Loading