summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocSimple.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-06 07:33:36 +0000
committerChris Lattner <sabre@nondot.org>2007-12-06 07:33:36 +0000
commit7c709a5d08b4d0597ce66764c8752e5bd7306f9d (patch)
tree8f1f8b1ea1dbcc797148b379a394a5b27c5380d5 /llvm/lib/CodeGen/RegAllocSimple.cpp
parentd2bbbabbfb93ab582477c24fea221862af1588a9 (diff)
downloadbcm5719-llvm-7c709a5d08b4d0597ce66764c8752e5bd7306f9d.tar.gz
bcm5719-llvm-7c709a5d08b4d0597ce66764c8752e5bd7306f9d.zip
implement a readme entry, compiling the code into:
_foo: movl $12, %eax andl 4(%esp), %eax movl _array(%eax), %eax ret instead of: _foo: movl 4(%esp), %eax shrl $2, %eax andl $3, %eax movl _array(,%eax,4), %eax ret As it turns out, this triggers all the time, in a wide variety of situations, for example, I see diffs like this in various programs: - movl 8(%eax), %eax - shll $2, %eax - andl $1020, %eax - movl (%esi,%eax), %eax + movzbl 8(%eax), %eax + movl (%esi,%eax,4), %eax - shll $2, %edx - andl $1020, %edx - movl (%edi,%edx), %edx + andl $255, %edx + movl (%edi,%edx,4), %edx Unfortunately, I also see stuff like this, which can be fixed in the X86 backend: - andl $85, %ebx - addl _bit_count(,%ebx,4), %ebp + shll $2, %ebx + andl $340, %ebx + addl _bit_count(%ebx), %ebp llvm-svn: 44656
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocSimple.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud