[llvm] [LoopVectorize] Add support for vectorisation of more early exit loops (PR #88385)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 13 02:16:20 PDT 2024
david-arm 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?
I have put this in VectorUtils.h for now, because I do see value in using this function outside of LoopVectorize. If anyone can think of a more suitable place I am happy to move it!
https://github.com/llvm/llvm-project/pull/88385
More information about the llvm-commits
mailing list