[llvm] [DA] Set Distance to zero when Direction is EQ (PR #147966)
Ryotaro Kasuga via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 10 09:01:33 PDT 2025
================
@@ -3991,6 +4003,23 @@ DependenceInfo::depends(Instruction *Src, Instruction *Dst,
if (CompleteLoops[II])
Result.DV[II - 1].Scalar = false;
+ // Set the distance to zero if the direction is EQ.
+ // TODO: Ideally, the distance should be set to 0 immediately simultaneously
+ // with the corresponding direction being set to EQ.
+ for (unsigned II = 1; II <= Result.getLevels(); ++II) {
+ if (Result.getDirection(II) == Dependence::DVEntry::EQ)
----------------
kasuga-fj wrote:
The former. I noticed it when I changed the code a bit and saw that some of the dumped results in the tests changed from `=` to `0`. Added assert for the latter case.
https://github.com/llvm/llvm-project/pull/147966
More information about the llvm-commits
mailing list