2011-04-27 23:00:03 +00:00
|
|
|
; RUN: opt < %s -indvars -S | FileCheck %s
|
2009-04-27 21:03:15 +00:00
|
|
|
; PR4086
|
|
|
|
declare void @foo()
|
|
|
|
|
|
|
|
define void @test() {
|
|
|
|
entry:
|
|
|
|
br label %loop_body
|
|
|
|
|
2011-04-27 23:00:03 +00:00
|
|
|
loop_body:
|
|
|
|
%i = phi float [ %nexti, %loop_body ], [ 0.0, %entry ]
|
2009-04-27 21:03:15 +00:00
|
|
|
tail call void @foo()
|
2009-06-04 22:49:04 +00:00
|
|
|
%nexti = fadd float %i, 1.0
|
2011-04-27 23:00:03 +00:00
|
|
|
; CHECK: icmp ne i32 %{{[a-zA-Z$._0-9]+}}, 2
|
|
|
|
%less = fcmp olt float %nexti, 2.0
|
2009-04-27 21:03:15 +00:00
|
|
|
br i1 %less, label %loop_body, label %done
|
|
|
|
|
2011-04-27 23:00:03 +00:00
|
|
|
done:
|
2009-04-27 21:03:15 +00:00
|
|
|
ret void
|
|
|
|
}
|