From f59d3e605521a8aae768562c7bade63825a75c17 Mon Sep 17 00:00:00 2001 From: basioli-k Date: Thu, 23 Jan 2025 18:37:35 +0000 Subject: [PATCH] Add [[maybe_unused]] to a variable used only in assert in VPlan.h --- llvm/lib/Transforms/Vectorize/VPlan.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h index 42b35e8b57c07..16c64f32ab634 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({Op0, Op1}), ReductionInst), Opcode(Opcode) { - auto *AccumulatorRecipe = getOperand(1)->getDefiningRecipe(); + [[maybe_unused]] auto *AccumulatorRecipe = + getOperand(1)->getDefiningRecipe(); assert((isa(AccumulatorRecipe) || isa(AccumulatorRecipe)) && "Unexpected operand order for partial reduction recipe");