1 ; RUN: opt < %s -instcombine -S > %t
2 ; RUN: grep {icmp eq} %t
3 ; RUN: grep {ret i1 false} %t | count 2
4 ; RUN: grep {ret i1 true} %t | count 2
5 ; RUN: grep {icmp ne} %t
6 ; RUN: not grep {icmp slt} %t
9 ; When inst combining an FCMP with the LHS coming from a uitofp instruction, we
10 ; can't lower it to signed ICMP instructions.
12 define i1 @test1(i32 %val) {
13 %1 = uitofp i32 %val to double
14 %2 = fcmp ole double %1, 0.000000e+00
18 define i1 @test2(i32 %val) {
19 %1 = uitofp i32 %val to double
20 %2 = fcmp olt double %1, 0.000000e+00
24 define i1 @test3(i32 %val) {
25 %1 = uitofp i32 %val to double
26 %2 = fcmp oge double %1, 0.000000e+00
30 define i1 @test4(i32 %val) {
31 %1 = uitofp i32 %val to double
32 %2 = fcmp ogt double %1, 0.000000e+00
36 define i1 @test5(i32 %val) {
37 %1 = uitofp i32 %val to double
38 %2 = fcmp ogt double %1, -4.400000e+00
42 define i1 @test6(i32 %val) {
43 %1 = uitofp i32 %val to double
44 %2 = fcmp olt double %1, -4.400000e+00