[llvm] [AArch64][SVE] Select immediate offsets for multi-vector instructions (PR #201637)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 09:15:39 PDT 2026
================
@@ -4564,6 +4573,16 @@ defm : store_pn_x2<nxv2f64, int_aarch64_sve_stnt1_pn_x2, STNT1D_2Z_IMM>;
multiclass store_pn_x4<ValueType Ty, SDPatternOperator Store,
Instruction RegImmInst> {
+ let AddedComplexity = 1 in {
+ // scalar + immediate (mul vl)
+ def : Pat<(Store Ty:$vec0, Ty:$vec1, Ty:$vec2, Ty:$vec3, aarch64svcount:$PNg,
+ (am_sve_indexed_s4 GPR64sp:$base, simm4s1:$offset)),
+ (RegImmInst (REG_SEQUENCE ZPR4Mul4, Ty:$vec0, zsub0, Ty:$vec1, zsub1,
+ Ty:$vec2, zsub2, Ty:$vec3, zsub3),
+ PNR:$PNg, GPR64:$base, simm4s1:$offset)>;
----------------
MacDue wrote:
That does not really work with `am_sve_indexed_s4`, particularly if placed on the result pattern as it'll divide the result of `am_sve_indexed_s4` by the scale, but `am_sve_indexed` has already applied the scale.
https://github.com/llvm/llvm-project/pull/201637
More information about the llvm-commits
mailing list