[llvm] [LV] Support binary and unary operations with EVL-vectorization (PR #93854)
Kolya Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 7 12:58:16 PDT 2024
================
@@ -1405,11 +1407,16 @@ class VPInstruction : public VPRecipeWithIRFlags {
class VPWidenRecipe : public VPRecipeWithIRFlags {
unsigned Opcode;
+protected:
+ template <typename IterT>
+ VPWidenRecipe(unsigned VPDefOpcode, Instruction &I,
+ iterator_range<IterT> Operands)
+ : VPRecipeWithIRFlags(VPDefOpcode, Operands, I), Opcode(I.getOpcode()) {}
+
public:
template <typename IterT>
VPWidenRecipe(Instruction &I, iterator_range<IterT> Operands)
- : VPRecipeWithIRFlags(VPDef::VPWidenSC, Operands, I),
- Opcode(I.getOpcode()) {}
+ : VPWidenRecipe(VPDef::VPWidenSC, I, Operands) {}
----------------
nikolaypanchenko wrote:
Not sure I understand added hierarchy then. If the goal is to allow reuse of existing code, then what is different in `VPWidenStoreEVL` or `VPWidenLoadEVL` as they won't be treated as `VPWidenStore` or `VPWidenLoad` respectively:
```
isa<VPWidenMemoryRecipe>(EVLStore) => true
isa<VPWidenStoreEVLRecipe>(EVLStore) => true
isa<VPWidenStoreRecipe>(EVLStore) => false
```
Anyway, I'm _ok_ to extend classof for now
https://github.com/llvm/llvm-project/pull/93854
More information about the llvm-commits
mailing list