[llvm] [DA] Remove dead code from the Weak Crossing SIV test (PR #190355)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 3 08:50:32 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-analysis
Author: Ryotaro Kasuga (kasuga-fj)
<details>
<summary>Changes</summary>
The ConstantRange intersection check can now handle cases where the condition of this branch is satisfied. The check is performed before entering this function, so this part is no longer necessary.
---
Full diff: https://github.com/llvm/llvm-project/pull/190355.diff
1 Files Affected:
- (modified) llvm/lib/Analysis/DependenceAnalysis.cpp (-11)
``````````diff
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp
index da591472d8dc0..ab09b2095dcc3 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -1402,17 +1402,6 @@ bool DependenceInfo::weakCrossingSIVtest(const SCEVAddRecExpr *Src,
if (!ConstDelta)
return false;
- // We're certain that ConstCoeff > 0; therefore,
- // if Delta < 0, then no dependence.
- LLVM_DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
- LLVM_DEBUG(dbgs() << "\t ConstCoeff = " << *ConstCoeff << "\n");
- if (SE->isKnownNegative(Delta)) {
- // No dependence, Delta < 0
- ++WeakCrossingSIVindependence;
- ++WeakCrossingSIVsuccesses;
- return true;
- }
-
ConstantRange SrcRange = SE->getSignedRange(Src);
ConstantRange DstRange = SE->getSignedRange(Dst);
LLVM_DEBUG(dbgs() << "\t SrcRange = " << SrcRange << "\n");
``````````
</details>
https://github.com/llvm/llvm-project/pull/190355
More information about the llvm-commits
mailing list