[llvm] [VectorCombine] Use isSafeToSpeculativelyExecute to guard VP scalarization (PR #69494)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 11:49:23 PDT 2023


lukel97 wrote:

> Should we be able to speculate functions like `sdiv_nxv1i64_anymask`? It looks like we know that the divisor is non-zero. You call this out in the PR description but it does not seem to be supported:
> 
> > This also allows speculation in more cases, e.g. when the divisor is known to be non-zero.

I don't think we support scalarizing any of the *anymask test cases because we can't handle masks just yet:

https://github.com/llvm/llvm-project/blob/deb0c65f79e69dabf1c422c81d6726a23e8f8bf9/llvm/lib/Transforms/Vectorize/VectorCombine.cpp#L755-L767

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


More information about the llvm-commits mailing list