[llvm] [AArch64] Use SVE for load-extend-broadcast (PR #221689)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 01:59:00 PDT 2026
================
@@ -30233,6 +30142,15 @@ 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->noSVELD1RDUP() &&
+ Subtarget->isSVEorStreamingSVEAvailable() && Op->hasOneUse() &&
+ VT.getScalarType().isInteger() &&
+ VT.getScalarType() != LD->getMemoryVT().getScalarType()) {
----------------
sdesmalen-arm wrote:
Perhaps also add a check that we don't want to use SVE for this type? For example, for fixed-length vector types from using `-msve-vector-bits`, we still want to use LD1R. (Can you also add a test-case for this?)
https://github.com/llvm/llvm-project/pull/221689
More information about the llvm-commits
mailing list