2009-09-12 02:01:28 +08:00
|
|
|
; RUN: opt < %s -indvars -S | grep icmp | grep next
|
2009-04-28 05:03:15 +08:00
|
|
|
; PR4086
|
|
|
|
declare void @foo()
|
|
|
|
|
|
|
|
define void @test() {
|
|
|
|
entry:
|
|
|
|
br label %loop_body
|
|
|
|
|
|
|
|
loop_body:
|
|
|
|
%i = phi float [ %nexti, %loop_body ], [ 0.0, %entry ]
|
|
|
|
tail call void @foo()
|
2009-06-05 06:49:04 +08:00
|
|
|
%nexti = fadd float %i, 1.0
|
2009-04-28 05:03:15 +08:00
|
|
|
%less = fcmp olt float %nexti, 2.0
|
|
|
|
br i1 %less, label %loop_body, label %done
|
|
|
|
|
|
|
|
done:
|
|
|
|
ret void
|
|
|
|
}
|