aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-26 18:53:33 +0000
committerChris Lattner <sabre@nondot.org>2009-11-26 18:53:33 +0000
commit1ce0eaa25fc6ecead5f9bba3c17b8af612d830ef (patch)
treed4a5697c69a482ed1c93f5ff552d72645bf39477 /test/Analysis
parentb18004c13c0c494305b0ce1d748049f8c580bd99 (diff)
downloadexternal_llvm-1ce0eaa25fc6ecead5f9bba3c17b8af612d830ef.zip
external_llvm-1ce0eaa25fc6ecead5f9bba3c17b8af612d830ef.tar.gz
external_llvm-1ce0eaa25fc6ecead5f9bba3c17b8af612d830ef.tar.bz2
Implement PR1143 (at -m64) by making basicaa look through extensions. We
previously already handled it at -m32 because there were no i32->i64 extensions for addressing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/BasicAA/gep-alias.ll17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/Analysis/BasicAA/gep-alias.ll b/test/Analysis/BasicAA/gep-alias.ll
index 68722fb..0eb8bb0 100644
--- a/test/Analysis/BasicAA/gep-alias.ll
+++ b/test/Analysis/BasicAA/gep-alias.ll
@@ -115,4 +115,19 @@ define i32 @test7(i32* %p, i64 %i) {
; CHECK: ret i32 0
}
-
+; P[zext(i)] != p[zext(i+1)]
+; PR1143
+define i32 @test8(i32* %p, i32 %i) {
+ %i1 = zext i32 %i to i64
+ %pi = getelementptr i32* %p, i64 %i1
+ %i.next = add i32 %i, 1
+ %i.next2 = zext i32 %i.next to i64
+ %pi.next = getelementptr i32* %p, i64 %i.next2
+ %x = load i32* %pi
+ store i32 42, i32* %pi.next
+ %y = load i32* %pi
+ %z = sub i32 %x, %y
+ ret i32 %z
+; CHECK: @test8
+; CHECK: ret i32 0
+}