[llvm] [DA] Mark variable only used in assert as maybe_unused (PR #189100)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 27 13:05:22 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-analysis
Author: Walter Lee (googlewalt)
<details>
<summary>Changes</summary>
Fix 00aebbff71ff4e348538708064ba2e033ccd6b2a.
---
Full diff: https://github.com/llvm/llvm-project/pull/189100.diff
1 Files Affected:
- (modified) llvm/lib/Analysis/DependenceAnalysis.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp
index 76f514e4c9327..15634c2391255 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -2083,7 +2083,7 @@ bool DependenceInfo::testSIV(const SCEV *Src, const SCEV *Dst, unsigned &Level,
const SCEV *SrcCoeff = SrcAddRec->getStepRecurrence(*SE);
const SCEV *DstCoeff = DstAddRec->getStepRecurrence(*SE);
const Loop *CurSrcLoop = SrcAddRec->getLoop();
- const Loop *CurDstLoop = DstAddRec->getLoop();
+ [[maybe_unused]] const Loop *CurDstLoop = DstAddRec->getLoop();
assert(haveSameSD(CurSrcLoop, CurDstLoop) &&
"Loops in the SIV test should have the same iteration space and "
"depth");
``````````
</details>
https://github.com/llvm/llvm-project/pull/189100
More information about the llvm-commits
mailing list