[llvm] [LV] Support binary and unary operations with EVL-vectorization (PR #93854)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 3 19:56:23 PDT 2024
================
@@ -1363,6 +1370,49 @@ class VPWidenRecipe : public VPRecipeWithIRFlags {
#endif
};
+class VPWidenEVLRecipe : public VPWidenRecipe {
+private:
+ using VPRecipeWithIRFlags::transferFlags;
+
+public:
+ template <typename IterT>
+ VPWidenEVLRecipe(Instruction &I, iterator_range<IterT> Operands, VPValue &EVL)
+ : VPWidenRecipe(VPDef::VPWidenEVLSC, I, Operands) {
+ addOperand(&EVL);
+ }
+
+ ~VPWidenEVLRecipe() override = default;
+
+ VPWidenRecipe *clone() override final {
+ SmallVector<VPValue *> Ops(operands());
+ VPValue *EVL = Ops.pop_back_val();
----------------
arcbbb wrote:
Use `getEVL()` directly
https://github.com/llvm/llvm-project/pull/93854
More information about the llvm-commits
mailing list