blob: b8946dcf989abdb7a3f3f22c1b53116c3ba6daa9 [file] [log] [blame]
Chris Lattner8a536882006-10-20 00:41:31 +00001; RUN: llvm-as < %s | opt -simplifycfg -disable-output &&
2; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep select
3
4; PR957
5
6uint %test(uint %tmp) {
7cond_false179: ; preds = %cond_true
8 %tmp181 = seteq uint %tmp, 0 ; <bool> [#uses=1]
9 br bool %tmp181, label %cond_true182, label %cond_next185
10
11cond_true182: ; preds = %cond_false179
12 br label %cond_next185
13
14cond_next185: ; preds = %cond_true182, %cond_false179
15 %d0.3 = phi uint [ div (uint 1, uint 0), %cond_true182 ], [ %tmp,
16%cond_false179 ] ; <uint> [#uses=7]
17
18 ret uint %d0.3
19}
20
21uint %test2(uint %tmp) {
22cond_false179: ; preds = %cond_true
23 %tmp181 = seteq uint %tmp, 0 ; <bool> [#uses=1]
24 br bool %tmp181, label %cond_true182, label %cond_next185
25
26cond_true182: ; preds = %cond_false179
27 br label %cond_next185
28
29cond_next185: ; preds = %cond_true182, %cond_false179
30 %d0.3 = phi uint [ div (uint 1, uint 0), %cond_true182 ], [ %tmp,
31%cond_false179 ] ; <uint> [#uses=7]
32 call uint %test(uint 4)
33 ret uint %d0.3
34}
35