Skip to content

Commit ba35312

Browse files
Moved clone() methods to unreachable for EVL-recipes
1 parent 261900a commit ba35312

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
@@ -1457,12 +1457,8 @@ class VPWidenEVLRecipe : public VPWidenRecipe {
14571457
~VPWidenEVLRecipe() override = default;
14581458

14591459
VPWidenRecipe *clone() override final {
1460-
SmallVector<VPValue *> Ops(operands());
1461-
VPValue *EVL = Ops.pop_back_val();
1462-
auto *R = new VPWidenEVLRecipe(*getUnderlyingInstr(),
1463-
make_range(Ops.begin(), Ops.end()), *EVL);
1464-
R->transferFlags(*this);
1465-
return R;
1460+
llvm_unreachable("VPWidenStoreEVLRecipe cannot be cloned");
1461+
return nullptr;
14661462
}
14671463

14681464
VP_CLASSOF_IMPL(VPDef::VPWidenEVLSC);
@@ -2614,6 +2610,11 @@ struct VPWidenLoadEVLRecipe final : public VPWidenMemoryRecipe, public VPValue {
26142610
setMask(Mask);
26152611
}
26162612

2613+
VPWidenLoadEVLRecipe *clone() override {
2614+
llvm_unreachable("VPWidenLoadEVLRecipe recipe cannot be cloned");
2615+
return nullptr;
2616+
}
2617+
26172618
VP_CLASSOF_IMPL(VPDef::VPWidenLoadEVLSC)
26182619

26192620
/// Return the EVL operand.
@@ -2690,6 +2691,11 @@ struct VPWidenStoreEVLRecipe final : public VPWidenMemoryRecipe {
26902691
setMask(Mask);
26912692
}
26922693

2694+
VPWidenStoreEVLRecipe *clone() override {
2695+
llvm_unreachable("VPWidenStoreEVLRecipe cannot be cloned");
2696+
return nullptr;
2697+
}
2698+
26932699
VP_CLASSOF_IMPL(VPDef::VPWidenStoreEVLSC)
26942700

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

0 commit comments

Comments
 (0)