this now passes
[oota-llvm.git] / test / Transforms / LoopStrengthReduce / ops_after_indvar.ll
1 ; Check that this test makes INDVAR and related stuff dead, because P[indvar]
2 ; gets reduced, making INDVAR dead.
3
4 ; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep INDVAR
5
6 declare bool %pred()
7 declare int %getidx()
8
9 void %test([10000 x int]* %P) {
10         br label %Loop
11 Loop:
12         %INDVAR = phi int [0, %0], [%INDVAR2, %Loop]
13         %idx = call int %getidx()
14         %STRRED = getelementptr [10000 x int]* %P, int %INDVAR, int %idx
15         store int 0, int* %STRRED
16
17         %INDVAR2 = add int %INDVAR, 1
18         %cond = call bool %pred()
19         br bool %cond, label %Loop, label %Out
20 Out:
21         ret void
22 }