[llvm] [LV] Convert scatter stores with constant stride into strided stores (PR #206896)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 00:36:49 PDT 2026
================
@@ -3105,6 +3105,18 @@ static VPRecipeBase *optimizeMaskToEVL(VPValue *HeaderMask,
SpliceR, EVL, Mask);
}
+ if (match(&CurRecipe, m_Intrinsic<Intrinsic::experimental_vp_strided_store>(
+ m_VPValue(StoredVal), m_VPValue(Addr),
+ m_VPValue(Stride), m_RemoveMask(HeaderMask, Mask),
+ m_TruncOrSelf(m_Specific(&Plan->getVF()))))) {
+ if (!Mask)
+ Mask = Plan->getTrue();
+ auto *NewStore = cast<VPWidenMemIntrinsicRecipe>(&CurRecipe)->clone();
+ NewStore->setOperand(3, Mask);
----------------
lukel97 wrote:
Nit, this is a bit shorter than the if statement
```suggestion
NewStore->setOperand(3, Mask ? Mask : Plan->getTrue());
```
https://github.com/llvm/llvm-project/pull/206896
More information about the llvm-commits
mailing list