aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/stride-nine-with-base-reg.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-02-21 02:06:47 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-02-21 02:06:47 +0000
commitd9fb7124035d6f95fb08c5157ab1813fbb2a282f (patch)
tree4eea0bdefddeeb15360a0c1b03206707d7f3614a /test/CodeGen/X86/stride-nine-with-base-reg.ll
parent5a45d76c25d859c526fcdcdec3f07c97fec07d6b (diff)
downloadexternal_llvm-d9fb7124035d6f95fb08c5157ab1813fbb2a282f.zip
external_llvm-d9fb7124035d6f95fb08c5157ab1813fbb2a282f.tar.gz
external_llvm-d9fb7124035d6f95fb08c5157ab1813fbb2a282f.tar.bz2
Teach LSR sink to sink the immediate portion of the common expression back into uses if they fit in address modes of all the uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65215 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/stride-nine-with-base-reg.ll')
-rw-r--r--test/CodeGen/X86/stride-nine-with-base-reg.ll8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/CodeGen/X86/stride-nine-with-base-reg.ll b/test/CodeGen/X86/stride-nine-with-base-reg.ll
index 4bd9924..c0cfb85 100644
--- a/test/CodeGen/X86/stride-nine-with-base-reg.ll
+++ b/test/CodeGen/X86/stride-nine-with-base-reg.ll
@@ -1,14 +1,14 @@
-; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static | grep lea | count 1
+; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static | not grep lea
; RUN: llvm-as < %s | llc -march=x86-64 | not grep lea
-; For x86 there's an lea above the loop. In both cases, there shouldn't
-; be any lea instructions inside the loop.
+; _P should be sunk into the loop and folded into the address mode. There
+; shouldn't be any lea instructions inside the loop.
@B = external global [1000 x i8], align 32
@A = external global [1000 x i8], align 32
@P = external global [1000 x i8], align 32
-define void @foo(i32 %m, i32 %p) {
+define void @foo(i32 %m, i32 %p) nounwind {
entry:
%tmp1 = icmp sgt i32 %m, 0
br i1 %tmp1, label %bb, label %return