brintos

brintos / llvm-project-archived public Read only

0
0
Text · 694 B · af614cc Raw
25 lines · plain
1; Check that this test makes INDVAR and related stuff dead.2; RUN: opt < %s -loop-reduce -S | not grep INDVAR3 4; Provide legal integer types.5target datalayout = "n8:16:32:64"6 7declare i1 @pred()8 9define void @test(ptr %P) {10; <label>:011	br label %Loop12Loop:		; preds = %Loop, %013        %i = phi i32 [ 0, %0 ], [ %i.next, %Loop ]14	%INDVAR = phi i32 [ 0, %0 ], [ %INDVAR2, %Loop ]		; <i32> [#uses=2]15	%STRRED = getelementptr i32, ptr %P, i32 %INDVAR		; <ptr> [#uses=1]16	store i32 0, ptr %STRRED17	%INDVAR2 = add i32 %INDVAR, 1		; <i32> [#uses=1]18        %i.next = add i32 %i, 119	%cond = call i1 @pred( )		; <i1> [#uses=1]20	br i1 %cond, label %Loop, label %Out21Out:		; preds = %Loop22	ret void23}24 25