diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-19 07:11:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-19 07:11:01 +0000 |
commit | 41e431ba045eb317ebf0ec45b563a5d96c212f5c (patch) | |
tree | 4269a38badc0912d3398aa99fb717578c4316df4 /lib/CodeGen/RegAllocIterativeScan.cpp | |
parent | c71d6949b91e19610f0f85f57b402b4df43019a5 (diff) |
Teach the code generator that shrd/shld is commutable if it has an immediate.
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocIterativeScan.cpp')
0 files changed, 0 insertions, 0 deletions