[llvm] [LV][EVL] Generate negative strided load/store for reversed load/store (PR #123608)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 06:19:57 PST 2025


================
@@ -2765,11 +2760,26 @@ void VPWidenStoreEVLRecipe::execute(VPTransformState &State) {
                                     Intrinsic::vp_scatter,
                                     {StoredVal, Addr, Mask, EVL});
   } else {
-    VectorBuilder VBuilder(Builder);
-    VBuilder.setEVL(EVL).setMask(Mask);
-    NewSI = cast<CallInst>(VBuilder.createVectorInstruction(
-        Instruction::Store, Type::getVoidTy(EVL->getContext()),
-        {StoredVal, Addr}));
+    if (isReverse()) {
----------------
lukel97 wrote:

Nit, `else if (isReverse()) {`?

https://github.com/llvm/llvm-project/pull/123608


More information about the llvm-commits mailing list