[llvm] r360797 - Add unary fneg to InstSimplify/fp-nan.ll
Cameron McInally via llvm-commits
llvm-commits at lists.llvm.org
Wed May 15 12:37:04 PDT 2019
Author: mcinally
Date: Wed May 15 12:37:03 2019
New Revision: 360797
URL: http://llvm.org/viewvc/llvm-project?rev=360797&view=rev
Log:
Add unary fneg to InstSimplify/fp-nan.ll
Modified:
llvm/trunk/test/Transforms/InstSimplify/fp-nan.ll
Modified: llvm/trunk/test/Transforms/InstSimplify/fp-nan.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstSimplify/fp-nan.ll?rev=360797&r1=360796&r2=360797&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstSimplify/fp-nan.ll (original)
+++ llvm/trunk/test/Transforms/InstSimplify/fp-nan.ll Wed May 15 12:37:03 2019
@@ -109,6 +109,14 @@ define double @fneg_nan_1(double %x) {
ret double %r
}
+define double @unary_fneg_nan_1(double %x) {
+; CHECK-LABEL: @unary_fneg_nan_1(
+; CHECK-NEXT: ret double 0xFFFABCDEF0123456
+;
+ %r = fneg double 0x7FFABCDEF0123456
+ ret double %r
+}
+
define <2 x double> @fneg_nan_2(<2 x double> %x) {
; CHECK-LABEL: @fneg_nan_2(
; CHECK-NEXT: ret <2 x double> <double 0x7FF1234567890ABC, double 0xFFF0000000000001>
@@ -117,6 +125,14 @@ define <2 x double> @fneg_nan_2(<2 x dou
ret <2 x double> %r
}
+define <2 x double> @unary_fneg_nan_2(<2 x double> %x) {
+; CHECK-LABEL: @unary_fneg_nan_2(
+; CHECK-NEXT: ret <2 x double> <double 0x7FF1234567890ABC, double 0xFFF0000000000001>
+;
+ %r = fneg <2 x double> <double 0xFFF1234567890ABC, double 0x7FF0000000000001>
+ ret <2 x double> %r
+}
+
; Repeat all tests with fast-math-flags. Alternate 'nnan' and 'fast' for more coverage.
define float @fadd_nan_op0_nnan(float %x) {
More information about the llvm-commits
mailing list