[llvm] [LV]Fix/improve max safe distance analysis (PR #121156)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 12:14:35 PST 2025
================
@@ -226,7 +226,7 @@ for.end:
;Check the new calculation of the maximum safe distance in bits which can be vectorized.
;The previous behavior did not take account that the stride was 2.
-;Therefore the maxVF was computed as 8 instead of 4, as the dependence distance here is 6 iterations, given by |N-(N-12)|/2.
+;Therefore the maxVF was computed as 8 instead of 2, as the dependence distance here is 6 iterations, given by |N-(N-12)|/2.
----------------
alexey-bataev wrote:
I think so. If the dep distance is 6, the maxVF should be 2, not 4 (4 still introduces ineffective overlapping on the second iteration)
https://github.com/llvm/llvm-project/pull/121156
More information about the llvm-commits
mailing list