[llvm] [AArch64] Use SVE for load-extend-broadcast on V3AE (PR #221689)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 02:44:59 PDT 2026
================
@@ -30233,6 +30142,18 @@ static SDValue performDUPCombine(SDNode *N,
// v4i32 = SCALAR_TO_VECTOR (i32 (zextloadi8 addr)) ; Matches to ldr b0
// v4i32 = DUPLANE32 (v4i32), 0
if (auto *LD = dyn_cast<LoadSDNode>(Op)) {
+ if (SubTarget->preferSVEVectors() &&
+ SubTarget->isSVEorStreamingSVEAvailable() && Op->hasOneUse() &&
+ VT.getScalarType().isInteger()) {
+ EVT ScalaleVT = getContainerForFixedLengthVector(DCI.DAG, VT);
+ SDValue SplatNode =
+ DCI.DAG.getNode(ISD::SPLAT_VECTOR, DL, ScalaleVT, Op);
----------------
MacDue wrote:
You should not create nodes before you know you're going to use them. `SplatNode.getValueType().getScalarType()` should be the same as `VT.getScalarType()`, so this check and the 64-bit vector check can be moved to the outer condition.
https://github.com/llvm/llvm-project/pull/221689
More information about the llvm-commits
mailing list