[llvm] [AArch64] Extend performActiveLaneMaskCombine for more than two extracts (PR #146725)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 7 05:56:35 PDT 2025
================
@@ -18143,53 +18143,63 @@ performActiveLaneMaskCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI,
(!ST->hasSVE2p1() && !(ST->hasSME2() && ST->isStreaming())))
return SDValue();
- if (!N->hasNUsesOfValue(2, 0))
+ unsigned NumUses = N->use_size();
+ unsigned MaskMinElts = N->getValueType(0).getVectorMinNumElements();
----------------
paulwalker-arm wrote:
Please can you try to reduce the usage of getVectorMinNumElements()? In this instance you can use `isKnownMultipleOf()` and `divideCoefficientBy()` so the code is not, or at least not as, specific to scalable vectors.
https://github.com/llvm/llvm-project/pull/146725
More information about the llvm-commits
mailing list