[llvm] [AArch64][SME] Enable dynamic shuffle for fixed length types. (PR #72490)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 03:35:40 PST 2024
================
@@ -26171,13 +26196,29 @@ static SDValue GenerateFixedLengthSVETBL(SDValue Op, SDValue Op1, SDValue Op2,
DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, ContainerVT,
DAG.getConstant(Intrinsic::aarch64_sve_tbl, DL, MVT::i32),
Op1, SVEMask);
- else if (Subtarget.hasSVE2())
+ else if (Subtarget.hasSVE2()) {
+ if (!MinMaxEqual) {
+ SDValue VScale =
+ (BitsPerElt == 64)
+ ? DAG.getVScale(DL, MVT::i64, APInt(64, 128 / BitsPerElt))
+ : DAG.getVScale(DL, MVT::i32, APInt(32, 128 / BitsPerElt));
----------------
sdesmalen-arm wrote:
```suggestion
unsigned MinNumElts = AArch64::SVEBitsPerBlock / BitsPerElt;
SDValue VScale =
BitsPerElt == 64
? DAG.getVScale(DL, MVT::i64, APInt(64, MinNumElts))
: DAG.getVScale(DL, MVT::i32, APInt(32, MinNumElts));
```
https://github.com/llvm/llvm-project/pull/72490
More information about the llvm-commits
mailing list