diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-26 00:26:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-26 00:26:16 +0000 |
commit | 4c854315d57fae256e1ca853b48ca6ca50216aa5 (patch) | |
tree | a5cfb199a202b4901c74c9c4823cf3e01aa9ad22 /test/CodeGen/X86/2008-10-16-SpillerBug.ll | |
parent | 31e241b2509c66d494c7b2f9c3f80753ab242e5d (diff) | |
download | external_llvm-4c854315d57fae256e1ca853b48ca6ca50216aa5.zip external_llvm-4c854315d57fae256e1ca853b48ca6ca50216aa5.tar.gz external_llvm-4c854315d57fae256e1ca853b48ca6ca50216aa5.tar.bz2 |
Teach CodeGenPrepare to look through Bitcast instructions when attempting to
optimize addressing modes. This allows us to optimize things like isel-sink2.ll
into:
movl 4(%esp), %eax
cmpb $0, 4(%eax)
jne LBB1_2 ## F
LBB1_1: ## TB
movl $4, %eax
ret
LBB1_2: ## F
movzbl 7(%eax), %eax
ret
instead of:
_test:
movl 4(%esp), %eax
cmpb $0, 4(%eax)
leal 4(%eax), %eax
jne LBB1_2 ## F
LBB1_1: ## TB
movl $4, %eax
ret
LBB1_2: ## F
movzbl 3(%eax), %eax
ret
This shrinks (e.g.) 403.gcc from 1133510 to 1128345 lines of .s.
Note that the 2008-10-16-SpillerBug.ll testcase is dubious at best, I doubt
it is really testing what it thinks it is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2008-10-16-SpillerBug.ll')
-rw-r--r-- | test/CodeGen/X86/2008-10-16-SpillerBug.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGen/X86/2008-10-16-SpillerBug.ll b/test/CodeGen/X86/2008-10-16-SpillerBug.ll index a66073d..5caad4f 100644 --- a/test/CodeGen/X86/2008-10-16-SpillerBug.ll +++ b/test/CodeGen/X86/2008-10-16-SpillerBug.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -relocation-model=pic -disable-fp-elim -mtriple=i386-apple-darwin | grep and | grep 7 | grep ebp +; RUN: llvm-as < %s | llc -relocation-model=pic -disable-fp-elim -mtriple=i386-apple-darwin | grep {andl.*7.*ecx} %struct.XXDActiveTextureTargets = type { i64, i64, i64, i64, i64, i64 } %struct.XXDAlphaTest = type { float, i16, i8, i8 } |