aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstSimplify/fast-math.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstSimplify/fast-math.ll')
-rw-r--r--test/Transforms/InstSimplify/fast-math.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstSimplify/fast-math.ll b/test/Transforms/InstSimplify/fast-math.ll
index 71d1ed8..e7fb14d 100644
--- a/test/Transforms/InstSimplify/fast-math.ll
+++ b/test/Transforms/InstSimplify/fast-math.ll
@@ -105,3 +105,12 @@ define float @nofold_fadd_x_0(float %a) {
; CHECK: ret float %no_zero
ret float %no_zero
}
+
+; fdiv nsz nnan 0, X ==> 0
+define double @fdiv_zero_by_x(double %X) {
+; CHECK-LABEL: @fdiv_zero_by_x(
+; 0 / X -> 0
+ %r = fdiv nnan nsz double 0.0, %X
+ ret double %r
+; CHECK: ret double 0
+}