1 ; This testcase tests to see if adds and PHI's are handled in their full
2 ; generality. This testcase comes from the following C code:
6 ; for (i = 1; i < 100; i++) {
12 ; Note that this is a "feature" test, not a correctness test.
14 ; RUN: as < %s | opt -cee -simplifycfg | dis | not grep cond213
16 implementation ; Functions:
21 bb0: ; No predecessors!
24 bb2: ; preds = %bb4, %bb0
25 %cann-indvar = phi int [ 0, %bb0 ], [ %add1-indvar, %bb4 ] ; <int> [#uses=2]
26 %add1-indvar = add int %cann-indvar, 1 ; <int> [#uses=2]
27 %cond213 = seteq int %add1-indvar, 0 ; <bool> [#uses=1]
28 br bool %cond213, label %bb4, label %bb3
34 bb4: ; preds = %bb3, %bb2
35 %reg109 = add int %cann-indvar, 2 ; <int> [#uses=1]
36 %cond217 = setle int %reg109, 99 ; <bool> [#uses=1]
37 br bool %cond217, label %bb2, label %bb5