blob: 9fd2d2f04f7253effc367e3ff223048eb9f59540 [file] [log] [blame]
Dan Gohman3c7d3082009-09-11 18:01:28 +00001; RUN: opt < %s -indvars -S | grep icmp | grep next
Dale Johannesen6cb3e262009-04-27 21:03:15 +00002; PR4086
3declare void @foo()
4
5define void @test() {
6entry:
7 br label %loop_body
8
9loop_body:
10 %i = phi float [ %nexti, %loop_body ], [ 0.0, %entry ]
11 tail call void @foo()
Dan Gohman7ce405e2009-06-04 22:49:04 +000012 %nexti = fadd float %i, 1.0
Dale Johannesen6cb3e262009-04-27 21:03:15 +000013 %less = fcmp olt float %nexti, 2.0
14 br i1 %less, label %loop_body, label %done
15
16done:
17 ret void
18}