Remove llvm-upgrade and update tests.
[oota-llvm.git] / test / Transforms / SimplifyCFG / 2006-10-19-UncondDiv.ll
1 ; PR957
2 ; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | \
3 ; RUN:   not grep select
4
5 define i32 @test(i32 %tmp) {
6 cond_false179:
7         %tmp181 = icmp eq i32 %tmp, 0           ; <i1> [#uses=1]
8         br i1 %tmp181, label %cond_true182, label %cond_next185
9 cond_true182:           ; preds = %cond_false179
10         br label %cond_next185
11 cond_next185:           ; preds = %cond_true182, %cond_false179
12         %d0.3 = phi i32 [ udiv (i32 1, i32 0), %cond_true182 ], [ %tmp, %cond_false179 ]                ; <i32> [#uses=1]
13         ret i32 %d0.3
14 }
15
16 define i32 @test2(i32 %tmp) {
17 cond_false179:
18         %tmp181 = icmp eq i32 %tmp, 0           ; <i1> [#uses=1]
19         br i1 %tmp181, label %cond_true182, label %cond_next185
20 cond_true182:           ; preds = %cond_false179
21         br label %cond_next185
22 cond_next185:           ; preds = %cond_true182, %cond_false179
23         %d0.3 = phi i32 [ udiv (i32 1, i32 0), %cond_true182 ], [ %tmp, %cond_false179 ]                ; <i32> [#uses=1]
24         call i32 @test( i32 4 )         ; <i32>:0 [#uses=0]
25         ret i32 %d0.3
26 }