diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-19 06:18:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-19 06:18:43 +0000 |
| commit | 41fe201b61956decdf54f7ba4245e1b31c72fdbd (patch) | |
| tree | 1769ea6d3016d76017c437234e7a351621707520 /llvm/tools/llvm-ranlib/llvm-ranlib.cpp | |
| parent | 7230239553052ecd02894d6ce9f21000fccbafdd (diff) | |
| download | bcm5719-llvm-41fe201b61956decdf54f7ba4245e1b31c72fdbd.tar.gz bcm5719-llvm-41fe201b61956decdf54f7ba4245e1b31c72fdbd.zip | |
Codegen long >> 2 to this:
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
Diffstat (limited to 'llvm/tools/llvm-ranlib/llvm-ranlib.cpp')
0 files changed, 0 insertions, 0 deletions

