[llvm] [DA] Set Distance to zero when Direction is EQ (PR #147966)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 10 08:52:24 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- llvm/lib/Analysis/DependenceAnalysis.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp
index 65b803bff..84d255ef5 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -4013,12 +4013,12 @@ DependenceInfo::depends(Instruction *Src, Instruction *Dst,
Result.DV[II - 1].Distance = SE->getZero(SrcSCEV->getType());
#ifndef NDEBUG
- // Check that the converse (i.e., if the distance is zero, then the
- // direction is EQ) holds.
- const SCEV *Distance = Result.getDistance(II);
- if (Distance && Distance->isZero())
- assert(Result.getDirection(II) == Dependence::DVEntry::EQ &&
- "Distance is zero, but direction is not EQ");
+ // Check that the converse (i.e., if the distance is zero, then the
+ // direction is EQ) holds.
+ const SCEV *Distance = Result.getDistance(II);
+ if (Distance && Distance->isZero())
+ assert(Result.getDirection(II) == Dependence::DVEntry::EQ &&
+ "Distance is zero, but direction is not EQ");
#endif
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/147966
More information about the llvm-commits
mailing list