Home | History | Annotate | Download | only in IndVarSimplify
      1 ; RUN: opt < %s -indvars -S | FileCheck %s
      2 ; PR4086
      3 
      4 ; Provide legal integer types.
      5 target datalayout = "n8:16:32:64"
      6 
      7 declare void @foo()
      8 
      9 define void @test() {
     10 entry:
     11         br label %loop_body
     12 
     13 loop_body:
     14         %i = phi float [ %nexti, %loop_body ], [ 0.0, %entry ]
     15         tail call void @foo()
     16         %nexti = fadd float %i, 1.0
     17         ; CHECK: icmp ne i32 %{{[a-zA-Z$._0-9]+}}, 2
     18         %less = fcmp olt float %nexti, 2.0
     19         br i1 %less, label %loop_body, label %done
     20 
     21 done:
     22         ret void
     23 }
     24