[llvm] c9b7303 - Add [[maybe_unused]] to a variable used only in assert in VPlan.h (#124173)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 10:52:56 PST 2025
Author: Karlo Basioli
Date: 2025-01-23T18:52:53Z
New Revision: c9b7303b9b18129c4ee6b56aaa2a0a9f59be2d09
URL: https://github.com/llvm/llvm-project/commit/c9b7303b9b18129c4ee6b56aaa2a0a9f59be2d09
DIFF: https://github.com/llvm/llvm-project/commit/c9b7303b9b18129c4ee6b56aaa2a0a9f59be2d09.diff
LOG: Add [[maybe_unused]] to a variable used only in assert in VPlan.h (#124173)
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.h
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 42b35e8b57c07d..16c64f32ab6349 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -2461,7 +2461,8 @@ class VPPartialReductionRecipe : public VPSingleDefRecipe {
: VPSingleDefRecipe(VPDef::VPPartialReductionSC,
ArrayRef<VPValue *>({Op0, Op1}), ReductionInst),
Opcode(Opcode) {
- auto *AccumulatorRecipe = getOperand(1)->getDefiningRecipe();
+ [[maybe_unused]] auto *AccumulatorRecipe =
+ getOperand(1)->getDefiningRecipe();
assert((isa<VPReductionPHIRecipe>(AccumulatorRecipe) ||
isa<VPPartialReductionRecipe>(AccumulatorRecipe)) &&
"Unexpected operand order for partial reduction recipe");
More information about the llvm-commits
mailing list