[llvm] [SCEV][LV] Add Stride equal to one Predicate to enable strided access versioning (PR #77287)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 00:20:27 PST 2024


sjoerdmeijer wrote:

> Thanks for the patch! This is an interesting issue. One thing I am not sure yet if this has potential to clash with the other stride versioning logic in LAA.
> 
> For that particular case at hand, I think we may not need to version, as it looks like the wrap flags get dropped during `IndVars` before `LV`, but we may be able to retain the flags. This is something I am currently looking into.

This is slightly off-topic for this patch, but GCC has a loop-versioning pass running before vectorisation to deal with these sort of cases, whereas in our case we have some logic sprinkled around to deal with strided accesses. My curiousity and question @fhahn, is if you would see value in a separate loop-versioning pass like GCC?

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


More information about the llvm-commits mailing list