summaryrefslogtreecommitdiff
path: root/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2008-02-14 06:56:27 +0000
committerTanya Lattner <tonic@nondot.org>2008-02-14 06:56:27 +0000
commitdcd188d33fdaff8cea019ebd64e3a3d2b1a700c0 (patch)
treee443e360baad1556849b2bb86d4296b4c011b83e /test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll
parenteb05f90c71fc7b42e52d4f363fd8325bace9a0e7 (diff)
downloadllvm-dcd188d33fdaff8cea019ebd64e3a3d2b1a700c0.tar.gz
llvm-dcd188d33fdaff8cea019ebd64e3a3d2b1a700c0.tar.bz2
llvm-dcd188d33fdaff8cea019ebd64e3a3d2b1a700c0.tar.xz
Remove llvm-upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47110 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll')
-rw-r--r--test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll44
1 files changed, 21 insertions, 23 deletions
diff --git a/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll b/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll
index f29e9a0e8b..b8e30198e3 100644
--- a/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll
+++ b/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll
@@ -1,32 +1,30 @@
-; RUN: llvm-upgrade < %s | llvm-as | \
-; RUN: opt -aa-eval -disable-output |& grep {2 no alias respon}
+; RUN: llvm-as < %s | opt -aa-eval -disable-output |& grep {2 no alias respon}
+; TEST that A[1][0] may alias A[0][i].
-;; TEST that A[1][0] may alias A[0][i].
-
-void %test(int %N) {
+define void @test(i32 %N) {
entry:
- %X = alloca [3 x [3 x int]] ; <[3 x [3 x int]]*> [#uses=4]
- %tmp.24 = setgt int %N, 0 ; <bool> [#uses=1]
- br bool %tmp.24, label %no_exit, label %loopexit
+ %X = alloca [3 x [3 x i32]] ; <[3 x [3 x i32]]*> [#uses=4]
+ %tmp.24 = icmp sgt i32 %N, 0 ; <i1> [#uses=1]
+ br i1 %tmp.24, label %no_exit, label %loopexit
no_exit: ; preds = %no_exit, %entry
- %i.0.0 = phi int [ 0, %entry ], [ %inc, %no_exit ] ; <int> [#uses=2]
- %tmp.6 = getelementptr [3 x [3 x int]]* %X, int 0, int 0, int %i.0.0 ; <int*> [#uses=1]
- store int 1, int* %tmp.6
- %tmp.8 = getelementptr [3 x [3 x int]]* %X, int 0, int 0, int 0 ; <int*> [#uses=1]
- %tmp.9 = load int* %tmp.8 ; <int> [#uses=1]
- %tmp.11 = getelementptr [3 x [3 x int]]* %X, int 0, int 1, int 0 ; <int*> [#uses=1]
- %tmp.12 = load int* %tmp.11 ; <int> [#uses=1]
- %tmp.13 = add int %tmp.12, %tmp.9 ; <int> [#uses=1]
- %inc = add int %i.0.0, 1 ; <int> [#uses=2]
- %tmp.2 = setlt int %inc, %N ; <bool> [#uses=1]
- br bool %tmp.2, label %no_exit, label %loopexit
+ %i.0.0 = phi i32 [ 0, %entry ], [ %inc, %no_exit ] ; <i32> [#uses=2]
+ %tmp.6 = getelementptr [3 x [3 x i32]]* %X, i32 0, i32 0, i32 %i.0.0 ; <i32*> [#uses=1]
+ store i32 1, i32* %tmp.6
+ %tmp.8 = getelementptr [3 x [3 x i32]]* %X, i32 0, i32 0, i32 0 ; <i32*> [#uses=1]
+ %tmp.9 = load i32* %tmp.8 ; <i32> [#uses=1]
+ %tmp.11 = getelementptr [3 x [3 x i32]]* %X, i32 0, i32 1, i32 0 ; <i32*> [#uses=1]
+ %tmp.12 = load i32* %tmp.11 ; <i32> [#uses=1]
+ %tmp.13 = add i32 %tmp.12, %tmp.9 ; <i32> [#uses=1]
+ %inc = add i32 %i.0.0, 1 ; <i32> [#uses=2]
+ %tmp.2 = icmp slt i32 %inc, %N ; <i1> [#uses=1]
+ br i1 %tmp.2, label %no_exit, label %loopexit
loopexit: ; preds = %no_exit, %entry
- %Y.0.1 = phi int [ 0, %entry ], [ %tmp.13, %no_exit ] ; <int> [#uses=1]
- %tmp.4 = getelementptr [3 x [3 x int]]* %X, int 0, int 0 ; <[3 x int]*> [#uses=1]
- %tmp.15 = call int (...)* %foo( [3 x int]* %tmp.4, int %Y.0.1 ) ; <int> [#uses=0]
+ %Y.0.1 = phi i32 [ 0, %entry ], [ %tmp.13, %no_exit ] ; <i32> [#uses=1]
+ %tmp.4 = getelementptr [3 x [3 x i32]]* %X, i32 0, i32 0 ; <[3 x i32]*> [#uses=1]
+ %tmp.15 = call i32 (...)* @foo( [3 x i32]* %tmp.4, i32 %Y.0.1 ) ; <i32> [#uses=0]
ret void
}
-declare int %foo(...)
+declare i32 @foo(...)