[llvm] [VPlan] Extract reverse operation for reverse accesses (PR #146525)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 31 02:34:36 PDT 2025


================
@@ -7756,14 +7756,27 @@ VPRecipeBuilder::tryToWidenMemory(Instruction *I, ArrayRef<VPValue *> Operands,
     Builder.insert(VectorPtr);
     Ptr = VectorPtr;
   }
-  if (LoadInst *Load = dyn_cast<LoadInst>(I))
-    return new VPWidenLoadRecipe(*Load, Ptr, Mask, Consecutive, Reverse,
-                                 VPIRMetadata(*Load, LVer), I->getDebugLoc());
 
-  StoreInst *Store = cast<StoreInst>(I);
-  return new VPWidenStoreRecipe(*Store, Ptr, Operands[0], Mask, Consecutive,
+  if (auto *Load = dyn_cast<LoadInst>(I)) {
+    auto *LoadR =
+        new VPWidenLoadRecipe(*Load, Ptr, Mask, Consecutive, Reverse,
----------------
fhahn wrote:

Now that the load/store doesn't handle reversing, it should not need the flag to indicate it is reversing

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


More information about the llvm-commits mailing list