aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/fast-isel-gep.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-01-14 04:24:28 +0000
committerChris Lattner <sabre@nondot.org>2011-01-14 04:24:28 +0000
commit9e27cc80496bfa5d57bba26aa930e462e7e35a80 (patch)
treefdc35e8e7258ee99705592cc389ec5957e862a5c /test/CodeGen/X86/fast-isel-gep.ll
parent70e5e222dbae95cd75ae0610aa6740f886a7907e (diff)
downloadexternal_llvm-9e27cc80496bfa5d57bba26aa930e462e7e35a80.zip
external_llvm-9e27cc80496bfa5d57bba26aa930e462e7e35a80.tar.gz
external_llvm-9e27cc80496bfa5d57bba26aa930e462e7e35a80.tar.bz2
reapply r123414 now that the botz are calmed down and the fix is already in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/fast-isel-gep.ll')
-rw-r--r--test/CodeGen/X86/fast-isel-gep.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/X86/fast-isel-gep.ll b/test/CodeGen/X86/fast-isel-gep.ll
index 577dd72..622a1ff 100644
--- a/test/CodeGen/X86/fast-isel-gep.ll
+++ b/test/CodeGen/X86/fast-isel-gep.ll
@@ -70,3 +70,20 @@ entry:
; X64: test4:
; X64: 128(%r{{.*}},%r{{.*}},8)
}
+
+; PR8961 - Make sure the sext for the GEP addressing comes before the load that
+; is folded.
+define i64 @test5(i8* %A, i32 %I, i64 %B) nounwind {
+ %v8 = getelementptr i8* %A, i32 %I
+ %v9 = bitcast i8* %v8 to i64*
+ %v10 = load i64* %v9
+ %v11 = add i64 %B, %v10
+ ret i64 %v11
+; X64: test5:
+; X64: movslq %esi, %rax
+; X64-NEXT: movq (%rdi,%rax), %rax
+; X64-NEXT: addq %rdx, %rax
+; X64-NEXT: ret
+}
+
+