diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-06 16:02:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-06 16:02:27 +0000 |
commit | f2ee88eb5a37393b2ba71d6c0ab63b20ee4c7816 (patch) | |
tree | 957e78c5fbcbcba0b5e26f940af6d919bc06f27a /llvm/tools/gccld/GenerateCode.cpp | |
parent | 3ef249c05e6a983929258e7da940660dcb32c2bd (diff) | |
download | bcm5719-llvm-f2ee88eb5a37393b2ba71d6c0ab63b20ee4c7816.tar.gz bcm5719-llvm-f2ee88eb5a37393b2ba71d6c0ab63b20ee4c7816.zip |
Improve codegen of long == and != comparisons against constants. Before,
comparing a long against zero got us this:
sub %ESP, 8
mov DWORD PTR [%ESP + 4], %ESI
mov DWORD PTR [%ESP], %EDI
mov %EAX, DWORD PTR [%ESP + 12]
mov %EDX, DWORD PTR [%ESP + 16]
mov %ECX, 0
mov %ESI, 0
mov %EDI, %EAX
xor %EDI, %ECX
mov %ECX, %EDX
xor %ECX, %ESI
or %EDI, %ECX
sete %CL
test %CL, %CL
je .LBB2 # PC rel: F
Now it gets us this:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
mov %ECX, %EAX
or %ECX, %EDX
sete %CL
test %CL, %CL
je .LBB2 # PC rel: F
llvm-svn: 12696
Diffstat (limited to 'llvm/tools/gccld/GenerateCode.cpp')
0 files changed, 0 insertions, 0 deletions