@@ -1000,6 +1000,25 @@ def AArch64fcvtnu_half : SDNode<"AArch64ISD::FCVTNU_HALF", SDTFPExtendOp>;
10001000def AArch64fcvtps_half : SDNode<"AArch64ISD::FCVTPS_HALF", SDTFPExtendOp>;
10011001def AArch64fcvtpu_half : SDNode<"AArch64ISD::FCVTPU_HALF", SDTFPExtendOp>;
10021002
1003+ def AArch64sqadd_node: SDNode<"AArch64ISD::SQADD", SDTFPBinOp>;
1004+ def AArch64sqrshl: SDNode<"AArch64ISD::SQRSHL", SDTFPBinOp>;
1005+ def AArch64sqshl: SDNode<"AArch64ISD::SQSHL", SDTFPBinOp>;
1006+ def AArch64sqsub_node: SDNode<"AArch64ISD::SQSUB", SDTFPBinOp>;
1007+ def AArch64uqadd: SDNode<"AArch64ISD::UQADD", SDTFPBinOp>;
1008+ def AArch64uqrshl: SDNode<"AArch64ISD::UQRSHL", SDTFPBinOp>;
1009+ def AArch64uqshl: SDNode<"AArch64ISD::UQSHL", SDTFPBinOp>;
1010+ def AArch64uqsub: SDNode<"AArch64ISD::UQSUB", SDTFPBinOp>;
1011+
1012+ // This patfrags are temporary hack to get around pattern matching issues with not yet updated intrinsics.
1013+ def AArch64sqadd: PatFrags<(ops node:$lhs, node:$rhs),
1014+ [(bitconvert (AArch64sqadd_node (f32 (bitconvert node:$lhs)), (f32 (bitconvert node:$rhs)))),
1015+ (bitconvert (AArch64sqadd_node (f64 (bitconvert node:$lhs)), (f64 (bitconvert node:$rhs)))),
1016+ (int_aarch64_neon_sqadd node:$lhs, node:$rhs)]>;
1017+ def AArch64sqsub: PatFrags<(ops node:$lhs, node:$rhs),
1018+ [(bitconvert (AArch64sqsub_node (f32 (bitconvert node:$lhs)), (f32 (bitconvert node:$rhs)))),
1019+ (bitconvert (AArch64sqsub_node (f64 (bitconvert node:$lhs)), (f64 (bitconvert node:$rhs)))),
1020+ (int_aarch64_neon_sqsub node:$lhs, node:$rhs)]>;
1021+
10031022//def Aarch64softf32tobf16v8: SDNode<"AArch64ISD::", SDTFPRoundOp>;
10041023
10051024// Vector immediate ops
@@ -6453,19 +6472,19 @@ defm FCMGT : SIMDThreeScalarFPCmp<1, 1, 0b100, "fcmgt", AArch64fcmgt>;
64536472defm FMULX : SIMDFPThreeScalar<0, 0, 0b011, "fmulx", int_aarch64_neon_fmulx, HasNEONandIsStreamingSafe>;
64546473defm FRECPS : SIMDFPThreeScalar<0, 0, 0b111, "frecps", int_aarch64_neon_frecps, HasNEONandIsStreamingSafe>;
64556474defm FRSQRTS : SIMDFPThreeScalar<0, 1, 0b111, "frsqrts", int_aarch64_neon_frsqrts, HasNEONandIsStreamingSafe>;
6456- defm SQADD : SIMDThreeScalarBHSD<0, 0b00001, "sqadd", int_aarch64_neon_sqadd, saddsat>;
6475+ defm SQADD : SIMDThreeScalarBHSD<0, 0b00001, "sqadd", AArch64sqadd_node, int_aarch64_neon_sqadd, saddsat>;
64576476defm SQDMULH : SIMDThreeScalarHS< 0, 0b10110, "sqdmulh", int_aarch64_neon_sqdmulh>;
64586477defm SQRDMULH : SIMDThreeScalarHS< 1, 0b10110, "sqrdmulh", int_aarch64_neon_sqrdmulh>;
6459- defm SQRSHL : SIMDThreeScalarBHSD<0, 0b01011, "sqrshl", int_aarch64_neon_sqrshl, int_aarch64_neon_sqrshl>;
6460- defm SQSHL : SIMDThreeScalarBHSD<0, 0b01001, "sqshl", int_aarch64_neon_sqshl, int_aarch64_neon_sqshl>;
6461- defm SQSUB : SIMDThreeScalarBHSD<0, 0b00101, "sqsub", int_aarch64_neon_sqsub, ssubsat>;
6478+ defm SQRSHL : SIMDThreeScalarBHSD<0, 0b01011, "sqrshl", AArch64sqrshl, int_aarch64_neon_sqrshl, int_aarch64_neon_sqrshl>;
6479+ defm SQSHL : SIMDThreeScalarBHSD<0, 0b01001, "sqshl", AArch64sqshl, int_aarch64_neon_sqshl, int_aarch64_neon_sqshl>;
6480+ defm SQSUB : SIMDThreeScalarBHSD<0, 0b00101, "sqsub", AArch64sqsub_node, int_aarch64_neon_sqsub, ssubsat>;
64626481defm SRSHL : SIMDThreeScalarD< 0, 0b01010, "srshl", int_aarch64_neon_srshl>;
64636482defm SSHL : SIMDThreeScalarD< 0, 0b01000, "sshl", int_aarch64_neon_sshl>;
64646483defm SUB : SIMDThreeScalarD< 1, 0b10000, "sub", sub>;
6465- defm UQADD : SIMDThreeScalarBHSD<1, 0b00001, "uqadd", int_aarch64_neon_uqadd, uaddsat>;
6466- defm UQRSHL : SIMDThreeScalarBHSD<1, 0b01011, "uqrshl", int_aarch64_neon_uqrshl, int_aarch64_neon_uqrshl>;
6467- defm UQSHL : SIMDThreeScalarBHSD<1, 0b01001, "uqshl", int_aarch64_neon_uqshl, int_aarch64_neon_uqshl>;
6468- defm UQSUB : SIMDThreeScalarBHSD<1, 0b00101, "uqsub", int_aarch64_neon_uqsub, usubsat>;
6484+ defm UQADD : SIMDThreeScalarBHSD<1, 0b00001, "uqadd", AArch64uqadd, int_aarch64_neon_uqadd, uaddsat>;
6485+ defm UQRSHL : SIMDThreeScalarBHSD<1, 0b01011, "uqrshl", AArch64uqrshl, int_aarch64_neon_uqrshl, int_aarch64_neon_uqrshl>;
6486+ defm UQSHL : SIMDThreeScalarBHSD<1, 0b01001, "uqshl", AArch64uqshl, int_aarch64_neon_uqshl, int_aarch64_neon_uqshl>;
6487+ defm UQSUB : SIMDThreeScalarBHSD<1, 0b00101, "uqsub", AArch64uqsub, int_aarch64_neon_uqsub, usubsat>;
64696488defm URSHL : SIMDThreeScalarD< 1, 0b01010, "urshl", int_aarch64_neon_urshl>;
64706489defm USHL : SIMDThreeScalarD< 1, 0b01000, "ushl", int_aarch64_neon_ushl>;
64716490let Predicates = [HasRDM] in {
@@ -6520,11 +6539,11 @@ defm SQDMULL : SIMDThreeScalarMixedHS<0, 0b11010, "sqdmull",
65206539defm SQDMLAL : SIMDThreeScalarMixedTiedHS<0, 0b10010, "sqdmlal">;
65216540defm SQDMLSL : SIMDThreeScalarMixedTiedHS<0, 0b10110, "sqdmlsl">;
65226541
6523- def : Pat<(i64 (int_aarch64_neon_sqadd (i64 FPR64:$Rd),
6542+ def : Pat<(i64 (AArch64sqadd (i64 FPR64:$Rd),
65246543 (i64 (int_aarch64_neon_sqdmulls_scalar (i32 FPR32:$Rn),
65256544 (i32 FPR32:$Rm))))),
65266545 (SQDMLALi32 FPR64:$Rd, FPR32:$Rn, FPR32:$Rm)>;
6527- def : Pat<(i64 (int_aarch64_neon_sqsub (i64 FPR64:$Rd),
6546+ def : Pat<(i64 (AArch64sqsub (i64 FPR64:$Rd),
65286547 (i64 (int_aarch64_neon_sqdmulls_scalar (i32 FPR32:$Rn),
65296548 (i32 FPR32:$Rm))))),
65306549 (SQDMLSLi32 FPR64:$Rd, FPR32:$Rn, FPR32:$Rm)>;
@@ -8545,9 +8564,9 @@ defm SMLSL : SIMDVectorIndexedLongSDTied<0, 0b0110, "smlsl",
85458564 TriOpFrag<(sub node:$LHS, (AArch64smull node:$MHS, node:$RHS))>>;
85468565defm SMULL : SIMDVectorIndexedLongSD<0, 0b1010, "smull", AArch64smull>;
85478566defm SQDMLAL : SIMDIndexedLongSQDMLXSDTied<0, 0b0011, "sqdmlal", saddsat,
8548- int_aarch64_neon_sqadd >;
8567+ AArch64sqadd >;
85498568defm SQDMLSL : SIMDIndexedLongSQDMLXSDTied<0, 0b0111, "sqdmlsl", ssubsat,
8550- int_aarch64_neon_sqsub >;
8569+ AArch64sqsub >;
85518570defm SQRDMLAH : SIMDIndexedSQRDMLxHSDTied<1, 0b1101, "sqrdmlah",
85528571 int_aarch64_neon_sqrdmlah>;
85538572defm SQRDMLSH : SIMDIndexedSQRDMLxHSDTied<1, 0b1111, "sqrdmlsh",
0 commit comments