Skip to content

Commit e98f964

Browse files
Moved clone() methods to unreachable for EVL-recipes
1 parent d4543d5 commit e98f964

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

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

14701466
VP_CLASSOF_IMPL(VPDef::VPWidenEVLSC);
@@ -2616,6 +2612,11 @@ struct VPWidenLoadEVLRecipe final : public VPWidenMemoryRecipe, public VPValue {
26162612
setMask(Mask);
26172613
}
26182614

2615+
VPWidenLoadEVLRecipe *clone() override {
2616+
llvm_unreachable("VPWidenLoadEVLRecipe recipe cannot be cloned");
2617+
return nullptr;
2618+
}
2619+
26192620
VP_CLASSOF_IMPL(VPDef::VPWidenLoadEVLSC)
26202621

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

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

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

0 commit comments

Comments
 (0)