1 ; This test checks to see if the CEE pass is applying jump-bypassing for values
2 ; determined by PHI nodes. Because we are coming from a particular block, we
3 ; know what value a PHI node will take on this edge and should exploit it.
5 ; This testcase comes from the following C code:
15 ; RUN: llvm-as < %s | opt -cee -simplifycfg | llvm-dis | not grep bb3
21 bb0: ; No predecessors!
22 %cond215 = seteq int %c, 0 ; <bool> [#uses=1]
23 br bool %cond215, label %bb3, label %bb4
28 bb4: ; preds = %bb3, %bb0
29 %reg110 = phi int [ 8, %bb3 ], [ 2, %bb0 ] ; <int> [#uses=2]
30 %cond217 = setgt int %reg110, 19 ; <bool> [#uses=1]
31 br bool %cond217, label %bb6, label %bb5
33 bb5: ; preds = %bb5, %bb4
34 %cann-indvar = phi int [ 0, %bb4 ], [ %add1-indvar, %bb5 ] ; <int> [#uses=2]
35 %add1-indvar = add int %cann-indvar, 1 ; <int> [#uses=1]
36 %reg111 = add int %cann-indvar, %reg110 ; <int> [#uses=1]
38 %reg112 = add int %reg111, 1 ; <int> [#uses=1]
39 %cond222 = setle int %reg112, 19 ; <bool> [#uses=1]
40 br bool %cond222, label %bb5, label %bb6
42 bb6: ; preds = %bb5, %bb4