1 ; Check that this test makes INDVAR and related stuff dead.
2 ; RUN: opt < %s -loop-reduce -S | not grep INDVAR
4 ; Provide legal integer types.
5 target datalayout = "n8:16:32:64"
9 define void @test(i32* %P) {
12 Loop: ; preds = %Loop, %0
13 %i = phi i32 [ 0, %0 ], [ %i.next, %Loop ]
14 %INDVAR = phi i32 [ 0, %0 ], [ %INDVAR2, %Loop ] ; <i32> [#uses=2]
15 %STRRED = getelementptr i32, i32* %P, i32 %INDVAR ; <i32*> [#uses=1]
16 store i32 0, i32* %STRRED
17 %INDVAR2 = add i32 %INDVAR, 1 ; <i32> [#uses=1]
18 %i.next = add i32 %i, 1
19 %cond = call i1 @pred( ) ; <i1> [#uses=1]
20 br i1 %cond, label %Loop, label %Out