[llvm] [LoopInterchange] Increment isDirectionNegative check to next level for scalar direction (PR #78951)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 22 12:54:30 PST 2024
Meinersbur wrote:
I would need a more convincing argument than "it makes my case work".
Suppose the scalar dependency is an implicit `<` dependencies.
```
for (int i = 0; i < n; ++i)
a=a/i;
```
This example would not be reversed because there is no inner level but consider this to be the "either way goes" case.
Reversing the scalar dependence would make a `>`-dependence out of it, which is definitely wrong because it would make it depend on the future (which `normalize()` is supposed to normalize).
Possibly, `normalize()` would also need to reverse the direction of scalar dependencies, but I would need some more thoughts on why
https://github.com/llvm/llvm-project/pull/78951
More information about the llvm-commits
mailing list