[llvm] [LoopVectorize] Add support for vectorisation of more early exit loops (PR #88385)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 14:55:26 PDT 2024


fhahn wrote:

 
> I may be able to move mayFault, but it does depend upon structures built up by LoopAccessAnalysis and I personally thought that this function might be useful outside of the vectoriser so it wasn't obvious where to move it to.

One place that might be worth looking at is https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp#L1343. `isDereferenceableAndAlignedInLoop` already has some logic to check if an access is dereferenceable across all loop iterations, it may be able to replace parts of the current `mayFault` implementation?

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


More information about the llvm-commits mailing list