diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-06 04:55:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-06 04:55:43 +0000 |
commit | 6ab06d5d198010b667c05d6c56fe7e1f5201e8dd (patch) | |
tree | 4e8d24c4534bc78aed694917274e965c925b53bd /docs/CommandGuide/bugpoint.html | |
parent | 028adc422da9eaa4fd16df839c89c1c343894ef6 (diff) | |
download | external_llvm-6ab06d5d198010b667c05d6c56fe7e1f5201e8dd.zip external_llvm-6ab06d5d198010b667c05d6c56fe7e1f5201e8dd.tar.gz external_llvm-6ab06d5d198010b667c05d6c56fe7e1f5201e8dd.tar.bz2 |
Handle various other important cases of multiplying a long constant immediate. For
example, multiplying X*(1 + (1LL << 32)) now produces:
test:
mov %ECX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
mov %EAX, %ECX
add %EDX, %ECX
ret
[[[Note to Alkis: why isn't linear scan generating this code?? This might be a
problem with your intervals being too conservative:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
add %EDX, %EAX
ret
end note]]]
Whereas GCC produces this:
T:
sub %esp, 12
mov %edx, DWORD PTR [%esp+16]
mov DWORD PTR [%esp+8], %edi
mov %ecx, DWORD PTR [%esp+20]
xor %edi, %edi
mov DWORD PTR [%esp], %ebx
mov %ebx, %edi
mov %eax, %edx
mov DWORD PTR [%esp+4], %esi
add %ebx, %edx
mov %edi, DWORD PTR [%esp+8]
lea %edx, [%ecx+%ebx]
mov %esi, DWORD PTR [%esp+4]
mov %ebx, DWORD PTR [%esp]
add %esp, 12
ret
I'm not sure example what GCC is smoking here, but it looks like it has just
confused itself with a bunch of stack slots or something. The intel compiler
is better, but still not good:
T:
movl 4(%esp), %edx #2.11
movl 8(%esp), %eax #2.11
lea (%eax,%edx), %ecx #3.12
movl $1, %eax #3.12
mull %edx #3.12
addl %ecx, %edx #3.12
ret #3.12
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/CommandGuide/bugpoint.html')
0 files changed, 0 insertions, 0 deletions