new testcase, not implemented yet
[oota-llvm.git] / test / Transforms / LoopStrengthReduce / share_ivs.ll
1 ; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep phi | wc -l | grep 1
2
3 ; This testcase should have ONE stride 18 indvar, the other use should have a
4 ; loop invariant value (B) added to it inside of the loop, instead of having
5 ; a whole indvar based on B for it.
6
7 ; XFAIL: *
8
9 declare bool %cond(uint)
10
11 void %test(uint %B) {
12         br label %Loop
13 Loop:
14         %IV = phi uint [0, %0], [%IVn, %Loop]
15
16         %C = mul uint %IV, 18
17         %D = mul uint %IV, 18
18         %E = add uint %D, %B
19
20         %cnd = call bool %cond(uint %E)
21         call bool %cond(uint %C)
22         %IVn = add uint %IV, 1
23         br bool %cnd, label %Loop, label %Out
24 Out:
25         ret void
26 }