diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp index 9645bd877fbf5e..a4787483813a9a 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp @@ -1575,7 +1575,8 @@ bool LoopVectorizationLegality::isVectorizableEarlyExitLoop() { LLVM_DEBUG( dbgs() << "LV: Found an early exit. Retrying with speculative exit count.\n"); - const SCEV *SpecExitCount = PSE.getSymbolicMaxBackedgeTakenCount(); + [[maybe_unused]] const SCEV *SpecExitCount = + PSE.getSymbolicMaxBackedgeTakenCount(); assert(!isa(SpecExitCount) && "Failed to get symbolic expression for backedge taken count");