llvm.org GIT mirror llvm / 26d5f66
upgrade this test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45391 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
1 changed file(s) with 12 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
1 ; RUN: grep {ret i32 %A}
0 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i32 %A}
21
3 int %test(int %A) {
4 %X = or bool false, false
5 br bool %X, label %T, label %C
6 T:
7 %B = add int %A, 1
8 br label %C
9 C:
10 %C = phi int [%B, %T], [%A, %0]
11 ret int %C
2 define i32 @test(i32 %A) {
3 %X = or i1 false, false
4 br i1 %X, label %T, label %C
5
6 T: ; preds = %0
7 %B = add i32 %A, 1
8 br label %C
9
10 C: ; preds = %T, %0
11 %C.upgrd.1 = phi i32 [ %B, %T ], [ %A, %0 ]
12 ret i32 %C.upgrd.1
1213 }