1 ; RUN: opt -passes=instcombine -S < %s | FileCheck %s
3 @.str = private unnamed_addr constant [35 x i8] c"\0Ain_range input (should be 0): %f\0A\00", align 1
4 @.str1 = external hidden unnamed_addr constant [35 x i8], align 1
6 declare i32 @printf(ptr, ...)
7 define i64 @_Z8tempCastj(i32 %val) uwtable ssp {
9 %call = call i32 (ptr, ...) @printf(ptr @.str1, i32 %val)
10 %conv = uitofp i32 %val to double
11 %call.i = call i32 (ptr, ...) @printf(ptr @.str, double %conv)
12 %cmp.i = fcmp oge double %conv, -1.000000e+00
13 br i1 %cmp.i, label %land.rhs.i, label %if.end.critedge
14 ; CHECK: br i1 true, label %land.rhs.i, label %if.end.critedge
16 land.rhs.i: ; preds = %entry
17 %cmp1.i = fcmp olt double %conv, 1.000000e+00
18 br i1 %cmp1.i, label %if.then, label %if.end
20 if.then: ; preds = %land.rhs.i
21 %add = fadd double %conv, 5.000000e-01
22 %conv3 = fptosi double %add to i64
25 if.end.critedge: ; preds = %entry
28 if.end: ; preds = %if.end.critedge, %land.rhs.i
31 return: ; preds = %if.end, %if.then
32 %retval.0 = phi i64 [ %conv3, %if.then ], [ -1, %if.end ]