Skip to content

Commit 40975da

Browse files
committed
[VPlan] Wrap planContainsAdditionalSimplifications in NDEBUG (NFC)
Only used for an assertion.
1 parent be5ecc3 commit 40975da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7239,11 +7239,12 @@ InstructionCost LoopVectorizationPlanner::cost(VPlan &Plan,
72397239
return Cost;
72407240
}
72417241

7242+
#ifndef NDEBUG
72427243
/// Return true if the original loop \ TheLoop contains any instructions that do
72437244
/// not have corresponding recipes in \p Plan and are not marked to be ignored
72447245
/// in \p CostCtx. This means the VPlan contains simplification that the legacy
72457246
/// cost-model did not account for.
7246-
[[maybe_unused]] static bool
7247+
static bool
72477248
planContainsAdditionalSimplifications(VPlan &Plan, ElementCount VF,
72487249
VPCostContext &CostCtx, Loop *TheLoop,
72497250
LoopVectorizationCostModel &CM) {
@@ -7288,6 +7289,7 @@ planContainsAdditionalSimplifications(VPlan &Plan, ElementCount VF,
72887289
});
72897290
});
72907291
}
7292+
#endif
72917293

72927294
VectorizationFactor LoopVectorizationPlanner::computeBestVF() {
72937295
if (VPlans.empty())

0 commit comments

Comments
 (0)