summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstSimplify/fast-math.ll
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-06-14 21:01:20 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-06-14 21:01:20 +0000
commit228680ded8bbd04dd179e953843f86c44e982448 (patch)
treef490bd34b83c56a43c68bd445c26214caddb0296 /llvm/test/Transforms/InstSimplify/fast-math.ll
parent4f0524614e664c56cc4a516439022af87c543247 (diff)
downloadbcm5719-llvm-228680ded8bbd04dd179e953843f86c44e982448.tar.gz
bcm5719-llvm-228680ded8bbd04dd179e953843f86c44e982448.zip
[InstSimplify] fsub nnan x, x -> 0.0 is valid without ninf
Both inf - inf and (-inf) - (-inf) are NaN, so it's already covered by nnan. llvm-svn: 239702
Diffstat (limited to 'llvm/test/Transforms/InstSimplify/fast-math.ll')
-rw-r--r--llvm/test/Transforms/InstSimplify/fast-math.ll6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/test/Transforms/InstSimplify/fast-math.ll b/llvm/test/Transforms/InstSimplify/fast-math.ll
index 0336301c354..c9ae7ef0f09 100644
--- a/llvm/test/Transforms/InstSimplify/fast-math.ll
+++ b/llvm/test/Transforms/InstSimplify/fast-math.ll
@@ -70,17 +70,17 @@ define float @fadd_fsub_0(float %a) {
ret float %ret
}
-; fsub nnan ninf x, x ==> 0.0
+; fsub nnan x, x ==> 0.0
; CHECK-LABEL: @fsub_x_x(
define float @fsub_x_x(float %a) {
; X - X ==> 0
- %zero1 = fsub nnan ninf float %a, %a
+ %zero1 = fsub nnan float %a, %a
; Dont fold
; CHECK: %no_zero1 = fsub
%no_zero1 = fsub ninf float %a, %a
; CHECK: %no_zero2 = fsub
- %no_zero2 = fsub nnan float %a, %a
+ %no_zero2 = fsub float %a, %a
; CHECK: %no_zero = fadd
%no_zero = fadd float %no_zero1, %no_zero2
OpenPOWER on IntegriCloud