llvm.org GIT mirror llvm / 8320006
Rename test directory to reflect new pass name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112592 91177308-0d34-0410-b5e6-96231b3b80d8 Owen Anderson 9 years ago
4 changed file(s) with 43 addition(s) and 43 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: opt < %s -correlated-propagation -S | FileCheck %s
1 ; PR2581
2
3 ; CHECK: @test1
4 define i32 @test1(i1 %C) nounwind {
5 br i1 %C, label %exit, label %body
6
7 body: ; preds = %0
8 ; CHECK-NOT: select
9 %A = select i1 %C, i32 10, i32 11 ; [#uses=1]
10 ; CHECK: ret i32 11
11 ret i32 %A
12
13 exit: ; preds = %0
14 ; CHECK: ret i32 10
15 ret i32 10
16 }
17
18 declare i1 @ext()
19 ; CHECK: @test2
20 define i1 @test2() {
21 entry:
22 %cond = tail call i1 @ext() ; [#uses=2]
23 br i1 %cond, label %bb1, label %bb2
24
25 bb1: ; preds = %entry
26 %cond2 = tail call i1 @ext() ; [#uses=1]
27 br i1 %cond2, label %bb3, label %bb2
28
29 bb2: ; preds = %bb1, %entry
30 ; CHECK-NOT: phi i1
31 %cond_merge = phi i1 [ %cond, %entry ], [ false, %bb1 ] ; [#uses=1]
32 ; CHECK: ret i1 false
33 ret i1 %cond_merge
34
35 bb3: ; preds = %bb1
36 %res = tail call i1 @ext() ; [#uses=1]
37 ; CHECK: ret i1 %res
38 ret i1 %res
39 }
0 load_lib llvm.exp
1
2 RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.ll]]
+0
-40
test/Transforms/ValuePropagation/basic.ll less more
None ; RUN: opt < %s -correlated-propagation -S | FileCheck %s
1 ; PR2581
2
3 ; CHECK: @test1
4 define i32 @test1(i1 %C) nounwind {
5 br i1 %C, label %exit, label %body
6
7 body: ; preds = %0
8 ; CHECK-NOT: select
9 %A = select i1 %C, i32 10, i32 11 ; [#uses=1]
10 ; CHECK: ret i32 11
11 ret i32 %A
12
13 exit: ; preds = %0
14 ; CHECK: ret i32 10
15 ret i32 10
16 }
17
18 declare i1 @ext()
19 ; CHECK: @test2
20 define i1 @test2() {
21 entry:
22 %cond = tail call i1 @ext() ; [#uses=2]
23 br i1 %cond, label %bb1, label %bb2
24
25 bb1: ; preds = %entry
26 %cond2 = tail call i1 @ext() ; [#uses=1]
27 br i1 %cond2, label %bb3, label %bb2
28
29 bb2: ; preds = %bb1, %entry
30 ; CHECK-NOT: phi i1
31 %cond_merge = phi i1 [ %cond, %entry ], [ false, %bb1 ] ; [#uses=1]
32 ; CHECK: ret i1 false
33 ret i1 %cond_merge
34
35 bb3: ; preds = %bb1
36 %res = tail call i1 @ext() ; [#uses=1]
37 ; CHECK: ret i1 %res
38 ret i1 %res
39 }
+0
-3
test/Transforms/ValuePropagation/dg.exp less more
None load_lib llvm.exp
1
2 RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.ll]]