llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[Loop Vectorizer] Loop is not vectorized despite builtin_assume

Open komalon1 opened this issue 3 years ago • 1 comments

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.

komalon1 avatar Aug 13 '23 10:08 komalon1

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

fhahn avatar May 07 '25 10:05 fhahn