[llvm] [LV] Support binary and unary operations with EVL-vectorization (PR #93854)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 17 13:17:09 PDT 2024
================
@@ -1366,6 +1373,49 @@ class VPWidenRecipe : public VPRecipeWithIRFlags {
#endif
};
+class VPWidenEVLRecipe : public VPWidenRecipe {
+ using VPRecipeWithIRFlags::transferFlags;
+
+public:
+ template <typename IterT>
+ VPWidenEVLRecipe(Instruction &I, iterator_range<IterT> Operands, VPValue &EVL)
+ : VPWidenRecipe(VPDef::VPWidenEVLSC, I, Operands) {
+ addOperand(&EVL);
+ }
+ VPWidenEVLRecipe(VPWidenRecipe *W, VPValue &EVL)
+ : VPWidenEVLRecipe(*W->getUnderlyingInstr(), W->operands(), EVL) {
+ this->transferFlags(*W);
+ }
+
+ ~VPWidenEVLRecipe() override = default;
+
+ VPWidenRecipe *clone() override final {
----------------
fhahn wrote:
at the moment this is only used when vectorizing the epilogue, which is disabled for EVL-style vectorization for now, right? Other recipes that don't exercise the clone() use unreachable here.
https://github.com/llvm/llvm-project/pull/93854
More information about the llvm-commits
mailing list