Skip to content

Commit 90a5888

Browse files
committed
Use an assert
1 parent 8448fd2 commit 90a5888

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2840,8 +2840,8 @@ InstructionCost VPExpressionRecipe::computeCost(ElementCount VF,
28402840
Ctx.CostKind);
28412841

28422842
case ExpressionTypes::ExtNegatedMulAccReduction:
2843-
if (Opcode == Instruction::Add)
2844-
Opcode = Instruction::Sub;
2843+
assert(Opcode == Instruction::Add && "Unexpected opcode");
2844+
Opcode = Instruction::Sub;
28452845
LLVM_FALLTHROUGH;
28462846
case ExpressionTypes::ExtMulAccReduction: {
28472847
return Ctx.TTI.getMulAccReductionCost(

0 commit comments

Comments
 (0)