blob: 8e583e880d7ac201a0eac650c9deb8141134e8d0 [file] [log] [blame]
Reid Spencer69ccadd2006-12-02 04:23:10 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output &&
2; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep select
Chris Lattner8a536882006-10-20 00:41:31 +00003
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