[llvm] [VPlan] Dispatch to multiple exit blocks via middle blocks. (PR #112138)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 22 03:59:52 PDT 2024


================

----------------
david-arm wrote:

It looks like these tests already vectorise today without this patch, except they are treated as requiring a scalar epilogue. Once I started landing bits of https://github.com/llvm/llvm-project/pull/88385 (which also contains the identical -enable-early-exit-vectorization flag that means something different), then effectively these tests will go back to requiring a scalar epilogue.

Perhaps it's worth rewriting the tests so that they don't vectorise prior to this patch? Effectively, I think perhaps the attribute `llvm.loop.vectorize.enable` should mean "bypass any legality checks (i.e. memory faults, etc.) and vectorise this regardless", as opposed to choosing between two possible styles of vectorisation when the loop is legal to vectorise.

In https://github.com/llvm/llvm-project/pull/88385 I also added a -assume-no-mem-fault flag that is a bit similar. Completely unsafe to use unless you know the memory is always accessible, but it permits bypassing legality checks regarding memory.


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


More information about the llvm-commits mailing list