summaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/fcmp.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/fcmp.ll')
-rw-r--r--test/Transforms/InstCombine/fcmp.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/fcmp.ll b/test/Transforms/InstCombine/fcmp.ll
index 2eb4f05..d08cbf5 100644
--- a/test/Transforms/InstCombine/fcmp.ll
+++ b/test/Transforms/InstCombine/fcmp.ll
@@ -58,3 +58,14 @@ define i1 @test7(float %x) nounwind readnone ssp noredzone {
; CHECK: @test7
; CHECK-NEXT: fpext float %x to ppc_fp128
}
+
+define float @test8(float %x) nounwind readnone optsize ssp {
+ %conv = fpext float %x to double
+ %cmp = fcmp olt double %conv, 0.000000e+00
+ %conv1 = zext i1 %cmp to i32
+ %conv2 = sitofp i32 %conv1 to float
+ ret float %conv2
+; Float comparison to zero shouldn't cast to double.
+; CHECK: @test8
+; CHECK-NEXT: fcmp olt float %x, 0.000000e+00
+}
OpenPOWER on IntegriCloud