[llvm] [SVE] Wide active lane mask (PR #76514)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 07:40:51 PST 2024
================
@@ -1202,6 +1202,35 @@ class VPInstruction : public VPRecipeWithIRFlags, public VPValue {
}
};
+class VPActiveLaneMaskRecipe : public VPRecipeWithIRFlags, public VPValue {
+ const std::string Name;
+ ElementCount MaxLength;
+
+public:
+ VPActiveLaneMaskRecipe(VPValue *IV, VPValue *TC, // ElementCount MaxLength,
+ DebugLoc DL = {}, const Twine &Name = "")
+ : VPRecipeWithIRFlags(VPDef::VPActiveLaneMaskSC,
+ std::initializer_list<VPValue *>{IV, TC}, DL),
+ VPValue(this), Name(Name.str()) {} //, MaxLength(MaxLength) {}
+
+ VP_CLASSOF_IMPL(VPDef::VPActiveLaneMaskSC)
+
+ void execute(VPTransformState &State) override;
+
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+ /// Print the recipe.
+ void print(raw_ostream &O, const Twine &Indent,
+ VPSlotTracker &SlotTracker) const override;
+#endif
+
+ bool onlyFirstLaneUsed(const VPValue *Op) const override {
+ assert(is_contained(operands(), Op) &&
+ "Op must be an operand of the recipe");
+
+ return getOperand(0) == Op;
----------------
CarolineConcatto wrote:
Why we need to check only the first operand?
https://github.com/llvm/llvm-project/pull/76514
More information about the llvm-commits
mailing list