Skip to content

Commit e0c7e7c

Browse files
Moved clone() methods to unreachable for EVL-recipes
1 parent 59978d0 commit e0c7e7c

File tree

1 file changed

+12
-6
lines changed
  • llvm/lib/Transforms/Vectorize

1 file changed

+12
-6
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,12 +1436,8 @@ class VPWidenEVLRecipe : public VPWidenRecipe {
14361436
~VPWidenEVLRecipe() override = default;
14371437

14381438
VPWidenRecipe *clone() override final {
1439-
SmallVector<VPValue *> Ops(operands());
1440-
VPValue *EVL = Ops.pop_back_val();
1441-
auto *R = new VPWidenEVLRecipe(*getUnderlyingInstr(),
1442-
make_range(Ops.begin(), Ops.end()), *EVL);
1443-
R->transferFlags(*this);
1444-
return R;
1439+
llvm_unreachable("VPWidenStoreEVLRecipe cannot be cloned");
1440+
return nullptr;
14451441
}
14461442

14471443
VP_CLASSOF_IMPL(VPDef::VPWidenEVLSC);
@@ -2526,6 +2522,11 @@ struct VPWidenLoadEVLRecipe final : public VPWidenMemoryRecipe, public VPValue {
25262522
setMask(Mask);
25272523
}
25282524

2525+
VPWidenLoadEVLRecipe *clone() override {
2526+
llvm_unreachable("VPWidenLoadEVLRecipe recipe cannot be cloned");
2527+
return nullptr;
2528+
}
2529+
25292530
VP_CLASSOF_IMPL(VPDef::VPWidenLoadEVLSC)
25302531

25312532
/// Return the EVL operand.
@@ -2602,6 +2603,11 @@ struct VPWidenStoreEVLRecipe final : public VPWidenMemoryRecipe {
26022603
setMask(Mask);
26032604
}
26042605

2606+
VPWidenStoreEVLRecipe *clone() override {
2607+
llvm_unreachable("VPWidenStoreEVLRecipe cannot be cloned");
2608+
return nullptr;
2609+
}
2610+
26052611
VP_CLASSOF_IMPL(VPDef::VPWidenStoreEVLSC)
26062612

26072613
/// Return the address accessed by this recipe.

0 commit comments

Comments
 (0)