llvm.org GIT mirror llvm / 29da5e6
Removing indvars tests that directly test canonical IVs and nothing else. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139518 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Trick 8 years ago
6 changed file(s) with 0 addition(s) and 137 deletion(s). Raw diff Collapse all Expand all
+0
-15
test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll less more
None ; RUN: opt < %s -indvars -S | grep indvar
1
2 define i32 @test() {
3 ;
4 br i1 true, label %LoopHead, label %LoopHead
5
6 LoopHead: ; preds = %LoopHead, %0, %0
7 %A = phi i32 [ 7, %0 ], [ 7, %0 ], [ %B, %LoopHead ] ; [#uses=1]
8 %B = add i32 %A, 1 ; [#uses=2]
9 br i1 true, label %LoopHead, label %Out
10
11 Out: ; preds = %LoopHead
12 ret i32 %B
13 }
14
+0
-15
test/Transforms/IndVarSimplify/2003-12-21-IndVarSize.ll less more
None ; RUN: opt < %s -indvars -S | grep indvar | not grep i32
1
2 @G = global i64 0 ; [#uses=1]
3
4 define void @test() {
5 ;
6 br label %Loop
7
8 Loop: ; preds = %Loop, %0
9 %X = phi i64 [ 1, %0 ], [ %X.next, %Loop ] ; [#uses=2]
10 %X.next = add i64 %X, 1 ; [#uses=1]
11 store i64 %X, i64* @G
12 br label %Loop
13 }
14
+0
-39
test/Transforms/IndVarSimplify/max-pointer.ll less more
None ; RUN: opt < %s -indvars -S > %t
1 ; RUN: grep {icmp ugt i8\\\*} %t | count 1
2 ; RUN: grep {icmp sgt i8\\\*} %t | count 1
3
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n:32:64"
5
6 %struct.CKenCodeCodec = type <{ i8 }>
7
8 define void @foo(i8* %str1Ptr, i8* %str2Ptr, i8* %inLastBytePtr) nounwind {
9 entry:
10 %0 = icmp ult i8* %str2Ptr, %str1Ptr ; [#uses=1]
11 %str2Ptr_addr.0 = select i1 %0, i8* %str1Ptr, i8* %str2Ptr ; [#uses=1]
12 br label %bb2
13
14 bb2: ; preds = %bb2, %entry
15 %str2Ptr_addr.1 = phi i8* [ %str2Ptr_addr.0, %entry ], [ %1, %bb2 ] ; [#uses=1]
16 %1 = getelementptr i8* %str2Ptr_addr.1, i64 1 ; [#uses=2]
17 %2 = icmp ult i8* %1, %inLastBytePtr ; [#uses=0]
18 br i1 undef, label %bb2, label %return
19
20 return: ; preds = %bb2
21 ret void
22 }
23
24 define void @sfoo(i8* %str1Ptr, i8* %str2Ptr, i8* %inLastBytePtr) nounwind {
25 entry:
26 %0 = icmp slt i8* %str2Ptr, %str1Ptr ; [#uses=1]
27 %str2Ptr_addr.0 = select i1 %0, i8* %str1Ptr, i8* %str2Ptr ; [#uses=1]
28 br label %bb2
29
30 bb2: ; preds = %bb2, %entry
31 %str2Ptr_addr.1 = phi i8* [ %str2Ptr_addr.0, %entry ], [ %1, %bb2 ] ; [#uses=1]
32 %1 = getelementptr i8* %str2Ptr_addr.1, i64 1 ; [#uses=2]
33 %2 = icmp slt i8* %1, %inLastBytePtr ; [#uses=0]
34 br i1 undef, label %bb2, label %return
35
36 return: ; preds = %bb2
37 ret void
38 }
+0
-15
test/Transforms/IndVarSimplify/pointer-indvars.ll less more
None ; RUN: opt < %s -indvars -S | grep indvar
1 @G = global i32* null ; [#uses=1]
2 @Array = external global [40 x i32] ; <[40 x i32]*> [#uses=1]
3
4 define void @test() {
5 ;
6 br label %Loop
7
8 Loop: ; preds = %Loop, %0
9 %X = phi i32* [ getelementptr ([40 x i32]* @Array, i64 0, i64 0), %0 ], [ %X.next, %Loop ] ; [#uses=2]
10 %X.next = getelementptr i32* %X, i64 1 ; [#uses=1]
11 store i32* %X, i32** @G
12 br label %Loop
13 }
14
+0
-38
test/Transforms/IndVarSimplify/pointer.ll less more
None ; RUN: opt < %s -indvars -S > %t
1 ; RUN: grep {%exitcond = icmp eq i64 %indvar.next, %n} %t
2 ; RUN: grep {getelementptr i8\\* %A, i64 %indvar} %t
3 ; RUN: grep getelementptr %t | count 1
4 ; RUN: grep add %t | count 1
5 ; RUN: not grep scevgep %t
6 ; RUN: not grep ptrtoint %t
7
8 ; Indvars should be able to expand the pointer-arithmetic
9 ; IV into an integer IV indexing into a simple getelementptr.
10
11 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-n:32:64"
12
13 define void @foo(i8* %A, i64 %n) nounwind {
14 entry:
15 %0 = icmp eq i64 %n, 0 ; [#uses=1]
16 br i1 %0, label %return, label %bb.nph
17
18 bb.nph: ; preds = %entry
19 %1 = getelementptr i8* %A, i64 %n ; [#uses=1]
20 br label %bb
21
22 bb: ; preds = %bb1, %bb.nph
23 %q.01 = phi i8* [ %2, %bb1 ], [ %A, %bb.nph ] ; [#uses=2]
24 store i8 0, i8* %q.01, align 1
25 %2 = getelementptr i8* %q.01, i64 1 ; [#uses=2]
26 br label %bb1
27
28 bb1: ; preds = %bb
29 %3 = icmp eq i8* %1, %2 ; [#uses=1]
30 br i1 %3, label %bb1.return_crit_edge, label %bb
31
32 bb1.return_crit_edge: ; preds = %bb1
33 br label %return
34
35 return: ; preds = %bb1.return_crit_edge, %entry
36 ret void
37 }
+0
-15
test/Transforms/IndVarSimplify/subtract.ll less more
None ; RUN: opt < %s -indvars -S | grep indvar
1
2 @G = global i64 0 ; [#uses=1]
3
4 define void @test(i64 %V) {
5 ;
6 br label %Loop
7
8 Loop: ; preds = %Loop, %0
9 %X = phi i64 [ 1, %0 ], [ %X.next, %Loop ] ; [#uses=2]
10 %X.next = sub i64 %X, %V ; [#uses=1]
11 store i64 %X, i64* @G
12 br label %Loop
13 }
14