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

Kolya Panchenko via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 14:49:27 PDT 2024


================
@@ -2372,15 +2391,144 @@ class VPWidenMemoryInstructionRecipe : public VPRecipeBase {
   bool onlyFirstLaneUsed(const VPValue *Op) const override {
     assert(is_contained(operands(), Op) &&
            "Op must be an operand of the recipe");
-
     // Widened, consecutive memory operations only demand the first lane of
     // their address, unless the same operand is also stored. That latter can
     // happen with opaque pointers.
-    return Op == getAddr() && isConsecutive() &&
-           (!isStore() || Op != getStoredValue());
+    return Op == getAddr() && isConsecutive();
   }
+};
 
-  Instruction &getIngredient() const { return Ingredient; }
+/// A recipe for widening load operations with vector-predication intrinsics,
+/// using the address to load from, the explicit vector length and an optional
+/// mask.
+struct VPWidenVPLoadRecipe final : public VPWidenMemoryRecipe, public VPValue {
----------------
nikolaypanchenko wrote:

My understanding that you want to have dedicated recipes that emit vp-intrinsics. Since they're derived from VPRecipe, is it expected they will be fully supported by VPlanTransforms ?

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


More information about the llvm-commits mailing list