[llvm] [LoopFusion] Extending SIV to handle separate loops (PR #146383)
Alireza Torabian via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 24 08:26:00 PDT 2025
================
@@ -1371,6 +1373,33 @@ struct LoopFuser {
<< "\n");
}
#endif
+ unsigned Levels = DepResult->getLevels();
+ unsigned SameSDLevels = DepResult->getSameSDLevels();
+ unsigned CurLoopLevel = FC0.L->getLoopDepth();
+
+ bool OuterEqDir = true;
+ for (unsigned II = 1; II <= std::min(CurLoopLevel - 1, Levels); ++II) {
+ unsigned Direction = DepResult->getDirection(II, II > Levels);
+ if (!(Direction & Dependence::DVEntry::EQ)) {
----------------
1997alireza wrote:
We want to consider directions that include equality not only the equality itself. For example if the direction is `>=`, it needs to return false as well.
https://github.com/llvm/llvm-project/pull/146383
More information about the llvm-commits
mailing list