ret <2 x float> %r
}
+define <vscale x 1 x float> @fsub_nan_op1_scalable_vec_0(<vscale x 1 x float> %x) {
+; CHECK-LABEL: @fsub_nan_op1_scalable_vec_0(
+; CHECK-NEXT: ret <vscale x 1 x float> shufflevector (<vscale x 1 x float> insertelement (<vscale x 1 x float> poison, float 0x7FF9000000000000, i64 0), <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer)
+;
+ %r = fsub <vscale x 1 x float> %x, shufflevector (<vscale x 1 x float> insertelement (<vscale x 1 x float> poison, float 0x7FF1000000000000, i64 0), <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer)
+ ret <vscale x 1 x float> %r
+}
+
+define <vscale x 1 x float> @fsub_nan_op1_scalable_vec_1(<vscale x 1 x float> %x) {
+; CHECK-LABEL: @fsub_nan_op1_scalable_vec_1(
+; CHECK-NEXT: ret <vscale x 1 x float> shufflevector (<vscale x 1 x float> insertelement (<vscale x 1 x float> poison, float 0xFFF9000000000000, i64 0), <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer)
+;
+ %r = fsub <vscale x 1 x float> %x, shufflevector (<vscale x 1 x float> insertelement (<vscale x 1 x float> poison, float 0xFFF1000000000000, i64 0), <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer)
+ ret <vscale x 1 x float> %r
+}
+
; Signaling and signed - make quiet and preserve the payload and signbit
define double @fmul_nan_op0(double %x) {
ret <2 x double> %r
}
+define <vscale x 1 x double> @fmul_nan_op0_scalable_vec_0(<vscale x 1 x double> %x) {
+; CHECK-LABEL: @fmul_nan_op0_scalable_vec_0(
+; CHECK-NEXT: ret <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF8000000000001, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
+;
+ %r = fmul <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF0000000000001, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer), %x
+ ret <vscale x 1 x double> %r
+}
+
+define <vscale x 1 x double> @fmul_nan_op0_scalable_vec_1(<vscale x 1 x double> %x) {
+; CHECK-LABEL: @fmul_nan_op0_scalable_vec_1(
+; CHECK-NEXT: ret <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF8DEADDEADDEAD, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
+;
+ %r = fmul <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF0DEADDEADDEAD, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer), %x
+ ret <vscale x 1 x double> %r
+}
+
; Vector type
define <2 x float> @fmul_nan_op1(<2 x float> %x) {
ret <2 x float> %r
}
+define <vscale x 1 x double> @fmul_nan_op1_scalable_vec(<vscale x 1 x double> %x) {
+; CHECK-LABEL: @fmul_nan_op1_scalable_vec(
+; CHECK-NEXT: ret <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0x7FF8000000000000, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
+;
+ %r = fmul <vscale x 1 x double> %x, shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0x7FF8000000000000, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
+ ret <vscale x 1 x double> %r
+}
+
; Vector signed and non-zero payload
define <2 x double> @fdiv_nan_op0(<2 x double> %x) {
ret <2 x double> %r
}
+define <vscale x 1 x double> @fdivl_nan_op0_scalable_vec(<vscale x 1 x double> %x) {
+; CHECK-LABEL: @fdivl_nan_op0_scalable_vec(
+; CHECK-NEXT: ret <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF800000000000F, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
+;
+ %r = fdiv <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF800000000000F, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer), %x
+ ret <vscale x 1 x double> %r
+}
+
; Vector with different NaN constant elements
define <2 x half> @fdiv_nan_op1(<2 x half> %x) {
ret <2 x half> %r
}
+define <vscale x 1 x half> @fdiv_nan_op1_scalable_vec(<vscale x 1 x half> %x) {
+; CHECK-LABEL: @fdiv_nan_op1_scalable_vec(
+; CHECK-NEXT: ret <vscale x 1 x half> shufflevector (<vscale x 1 x half> insertelement (<vscale x 1 x half> poison, half 0xH7FFF, i64 0), <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer)
+;
+ %r = fdiv <vscale x 1 x half> %x, shufflevector (<vscale x 1 x half> insertelement (<vscale x 1 x half> poison, half 0xH7FFF, i64 0), <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer)
+ ret <vscale x 1 x half> %r
+}
+
; Vector with poison element
define <2 x double> @fsub_nan_poison_op1(<2 x double> %x) {
ret <2 x double> %r
}
+define <vscale x 1 x double> @fneg_nan_2_scalable_vec() {
+; CHECK-LABEL: @fneg_nan_2_scalable_vec(
+; CHECK-NEXT: ret <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF9234567890ABC, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
+;
+ %r = fsub <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double -0.0, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer), shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF1234567890ABC, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
+ ret <vscale x 1 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>
ret <2 x double> %r
}
+; FIXME: This doesn't behave the same way as the fixed-length vectors above
+define <vscale x 1 x double> @unary_fneg_nan_2_scalable_vec_0() {
+; CHECK-LABEL: @unary_fneg_nan_2_scalable_vec_0(
+; CHECK-NEXT: [[R:%.*]] = fneg <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF1234567890ABC, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
+; CHECK-NEXT: ret <vscale x 1 x double> [[R]]
+;
+ %r = fneg <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF1234567890ABC, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
+ ret <vscale x 1 x double> %r
+}
+
+; FIXME: This doesn't behave the same way as the fixed-length vectors above
+define <vscale x 1 x double> @unary_fneg_nan_2_scalable_vec_1() {
+; CHECK-LABEL: @unary_fneg_nan_2_scalable_vec_1(
+; CHECK-NEXT: [[R:%.*]] = fneg <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0x7FF0000000000001, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
+; CHECK-NEXT: ret <vscale x 1 x double> [[R]]
+;
+ %r = fneg <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0x7FF0000000000001, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
+ ret <vscale x 1 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) {