2011-04-28 07:00:03 +08:00
|
|
|
; RUN: opt < %s -indvars -S | FileCheck %s
|
2009-04-28 05:03:15 +08:00
|
|
|
; PR4086
|
2015-03-05 02:43:29 +08:00
|
|
|
|
|
|
|
; Provide legal integer types.
|
|
|
|
target datalayout = "n8:16:32:64"
|
|
|
|
|
2009-04-28 05:03:15 +08:00
|
|
|
declare void @foo()
|
|
|
|
|
|
|
|
define void @test() {
|
|
|
|
entry:
|
|
|
|
br label %loop_body
|
|
|
|
|
2011-04-28 07:00:03 +08:00
|
|
|
loop_body:
|
|
|
|
%i = phi float [ %nexti, %loop_body ], [ 0.0, %entry ]
|
2009-04-28 05:03:15 +08:00
|
|
|
tail call void @foo()
|
2009-06-05 06:49:04 +08:00
|
|
|
%nexti = fadd float %i, 1.0
|
2011-04-28 07:00:03 +08:00
|
|
|
; CHECK: icmp ne i32 %{{[a-zA-Z$._0-9]+}}, 2
|
|
|
|
%less = fcmp olt float %nexti, 2.0
|
2009-04-28 05:03:15 +08:00
|
|
|
br i1 %less, label %loop_body, label %done
|
|
|
|
|
2011-04-28 07:00:03 +08:00
|
|
|
done:
|
2009-04-28 05:03:15 +08:00
|
|
|
ret void
|
|
|
|
}
|