diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp index efa238228f6c3..7db599ae51e16 100644 --- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp +++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp @@ -619,7 +619,7 @@ Value *VPInstruction::generate(VPTransformState &State) { auto *PhiR = cast(getOperand(0)); // Get its reduction variable descriptor. const RecurrenceDescriptor &RdxDesc = PhiR->getRecurrenceDescriptor(); - RecurKind RK = RdxDesc.getRecurrenceKind(); + [[maybe_unused]] RecurKind RK = RdxDesc.getRecurrenceKind(); assert(RecurrenceDescriptor::isFindLastIVRecurrenceKind(RK) && "Unexpected reduction kind"); assert(!PhiR->isInLoop() &&