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