[llvm] [VPlan] Introduce recipes for VP loads and stores. (PR #87816)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 13:45:47 PDT 2024


================
@@ -2436,6 +2468,51 @@ struct VPWidenStoreRecipe final : public VPWidenMemoryRecipe {
     return Op == getAddr() && isConsecutive() && Op != getStoredValue();
   }
 };
+
+/// A recipe for widening store operations with vector-predication intrinsics,
+/// using the value to store, the address to store to, the explicit vector
+/// length and an optional mask.
+struct VPWidenEVLStoreRecipe final : public VPWidenMemoryRecipe {
+  VPWidenEVLStoreRecipe(VPWidenStoreRecipe *S, VPValue *EVL, VPValue *Mask)
+      : VPWidenMemoryRecipe(VPDef::VPWidenEVLStoreSC,
+                            *cast<StoreInst>(&S->getIngredient()),
----------------
ayalz wrote:

nit: is the cast to StoreInst needed?

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


More information about the llvm-commits mailing list