blob: e70d577e0a9a5931db384c777747cbd47407e9a5 [file] [log] [blame]
Dale Johannesen6cb3e262009-04-27 21:03:15 +00001; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep icmp | grep next
2; 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}