[llvm] [LLVM][CodeGen][AArch64] Lower vector-(de)interleave to multi-register uzp/zip instructions. (PR #143128)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 9 02:06:42 PDT 2025
================
@@ -29210,6 +29210,28 @@ AArch64TargetLowering::LowerVECTOR_DEINTERLEAVE(SDValue Op,
assert(OpVT.isScalableVector() &&
"Expected scalable vector in LowerVECTOR_DEINTERLEAVE.");
+ // Are multi-register uzp instructions available?
+ if (Subtarget->hasSME2() && Subtarget->isStreaming() &&
+ OpVT.getVectorElementType() != MVT::i1) {
+ Intrinsic::ID IntID;
+ switch (Op->getNumOperands()) {
+ default:
+ return SDValue();
+ case 2:
+ IntID = Intrinsic::aarch64_sve_uzp_x2;
+ break;
+ case 4:
+ IntID = Intrinsic::aarch64_sve_uzp_x4;
+ break;
+ }
+
+ SmallVector<SDValue, 5> Ops;
+ Ops.push_back(DAG.getTargetConstant(IntID, DL, MVT::i64));
+ for (unsigned I = 0; I < Op.getNumOperands(); ++I)
+ Ops.push_back(Op.getOperand(I));
----------------
MacDue wrote:
```suggestion
Ops.append(Op->op_values().begin(), Op->op_values().end());
```
https://github.com/llvm/llvm-project/pull/143128
More information about the llvm-commits
mailing list