Add unary fneg to InstSimplify/fp-nan.ll

llvm-svn: 360797
This commit is contained in:
Cameron McInally 2019-05-15 19:37:03 +00:00
parent 9d020de3e8
commit a4d29b8e20
1 changed files with 16 additions and 0 deletions

View File

@ -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 double> %x) {
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) {