Mark maybe_unused variable (#133069)

... to avoid -Wunused-variable warnings/errors when assertions are off.
This commit is contained in:
Walter Lee 2025-03-26 11:51:09 +00:00 committed by GitHub
parent e5129b7e20
commit fed4727187
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -619,7 +619,7 @@ Value *VPInstruction::generate(VPTransformState &State) {
auto *PhiR = cast<VPReductionPHIRecipe>(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() &&