llvm-project
llvm-project copied to clipboard
[Loop Vectorizer] Loop is not vectorized despite builtin_assume
See reproducer in https://godbolt.org/z/M6a7zxxdK
Given the fact that stride >= width it should be safe to vectorize the load from l_out[(i + 1) * stride + j] and the store to l_out[i*stride + j] since they won't overlap.
Replacing stride with width works in this case.
Loop is now vectorized: https://godbolt.org/z/7YaaxeWvz
Please re-open the issue if it still reproduces on your end, with a new reproducer