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