Skip to content

Commit 7acd294

Browse files
committed
Fixup! Using cast to avoid warning when compiling without assertion.
1 parent 041f41b commit 7acd294

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,9 +2084,8 @@ InstructionCost VPReductionRecipe::computeCost(ElementCount VF,
20842084
(!RecurrenceDescriptor::isAnyOfRecurrenceKind(RdxKind) ||
20852085
ForceTargetInstructionCost.getNumOccurrences() > 0) &&
20862086
"Any-of reduction not implemented in VPlan-based cost model currently.");
2087-
auto *ReductionPHIRecipe = dyn_cast<VPReductionPHIRecipe>(getOperand(0));
20882087
assert(
2089-
(ReductionPHIRecipe && !ReductionPHIRecipe->isInLoop() ||
2088+
(!cast<VPReductionPHIRecipe>(getOperand(0))->isInLoop() ||
20902089
ForceTargetInstructionCost.getNumOccurrences() > 0) &&
20912090
"In-loop reduction not implemented in VPlan-based cost model currently.");
20922091

0 commit comments

Comments
 (0)