[llvm] [VPlan] Introduce recipes for VP loads and stores. (PR #87816)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 06:38:04 PDT 2024
================
@@ -2436,6 +2469,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 VPWidenVPStoreRecipe final : public VPWidenMemoryRecipe {
+ VPWidenVPStoreRecipe(VPWidenStoreRecipe *S, VPValue *EVL, VPValue *Mask)
+ : VPWidenMemoryRecipe(VPDef::VPWidenVPStoreSC,
+ *cast<StoreInst>(&S->getIngredient()),
+ {S->getAddr(), S->getStoredValue(), EVL},
+ S->isConsecutive(), false, S->getDebugLoc()) {
+ setMask(Mask);
+ }
+
+ VP_CLASSOF_IMPL(VPDef::VPWidenVPStoreSC)
+
+ /// Return the address accessed by this recipe.
+ VPValue *getStoredValue() const { return getOperand(1); }
+
+ /// Return the EVL operand.
+ VPValue *getEVL() const { return getOperand(2); }
+
+ /// Generate the wide load/store.
----------------
ayalz wrote:
```suggestion
/// Generate the wide store or scatter.
```
https://github.com/llvm/llvm-project/pull/87816
More information about the llvm-commits
mailing list