@@ -29451,6 +29451,30 @@ AArch64TargetLowering::LowerVECTOR_DEINTERLEAVE(SDValue Op,
29451
29451
assert(OpVT.isScalableVector() &&
29452
29452
"Expected scalable vector in LowerVECTOR_DEINTERLEAVE.");
29453
29453
29454
+ // Are multi-register uzp instructions available?
29455
+ if (Subtarget->hasSME2() && Subtarget->isStreaming() &&
29456
+ OpVT.getVectorElementType() != MVT::i1) {
29457
+ Intrinsic::ID IntID;
29458
+ switch (Op->getNumOperands()) {
29459
+ default:
29460
+ return SDValue();
29461
+ case 2:
29462
+ IntID = Intrinsic::aarch64_sve_uzp_x2;
29463
+ break;
29464
+ case 4:
29465
+ if (Subtarget->getMinSVEVectorSizeInBits() < 256 &&
29466
+ OpVT.getScalarSizeInBits() == 64)
29467
+ return SDValue();
29468
+ IntID = Intrinsic::aarch64_sve_uzp_x4;
29469
+ break;
29470
+ }
29471
+
29472
+ SmallVector<SDValue, 5> Ops;
29473
+ Ops.push_back(DAG.getTargetConstant(IntID, DL, MVT::i64));
29474
+ Ops.append(Op->op_values().begin(), Op->op_values().end());
29475
+ return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, Op->getVTList(), Ops);
29476
+ }
29477
+
29454
29478
if (Op->getNumOperands() != 2)
29455
29479
return SDValue();
29456
29480
@@ -29468,6 +29492,30 @@ SDValue AArch64TargetLowering::LowerVECTOR_INTERLEAVE(SDValue Op,
29468
29492
assert(OpVT.isScalableVector() &&
29469
29493
"Expected scalable vector in LowerVECTOR_INTERLEAVE.");
29470
29494
29495
+ // Are multi-register zip instructions available?
29496
+ if (Subtarget->hasSME2() && Subtarget->isStreaming() &&
29497
+ OpVT.getVectorElementType() != MVT::i1) {
29498
+ Intrinsic::ID IntID;
29499
+ switch (Op->getNumOperands()) {
29500
+ default:
29501
+ return SDValue();
29502
+ case 2:
29503
+ IntID = Intrinsic::aarch64_sve_zip_x2;
29504
+ break;
29505
+ case 4:
29506
+ if (Subtarget->getMinSVEVectorSizeInBits() < 256 &&
29507
+ OpVT.getScalarSizeInBits() == 64)
29508
+ return SDValue();
29509
+ IntID = Intrinsic::aarch64_sve_zip_x4;
29510
+ break;
29511
+ }
29512
+
29513
+ SmallVector<SDValue, 5> Ops;
29514
+ Ops.push_back(DAG.getTargetConstant(IntID, DL, MVT::i64));
29515
+ Ops.append(Op->op_values().begin(), Op->op_values().end());
29516
+ return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, Op->getVTList(), Ops);
29517
+ }
29518
+
29471
29519
if (Op->getNumOperands() != 2)
29472
29520
return SDValue();
29473
29521
0 commit comments