[llvm] [LoopInterchange] Increment isDirectionNegative check to next level for scalar direction (PR #78951)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 22:38:35 PST 2024


ShivaChen wrote:

> Skipping the scalar direction is incorrect. Scalar dependencies get carried from every iteration to every iteration, so they **must** be treated more conservatively than a `=` dependence.
> 
> I think this problem should be solved in the loop interchange pass itself where if the candidate pair of loops is nested inside other loops, and those outer loop IVs don't contribute to the index calculations in the pair of loops, then the dependence entries corresponding to the outer loops should be ignored.

Thanks for pointing the direction. :-)  Could you help me to check does the latest commit as you expected?

https://github.com/llvm/llvm-project/pull/78951


More information about the llvm-commits mailing list