[llvm] [InstCombine] Fold `(x < y) ? -1 : zext(x != y)` into `u/scmp(x,y)` (PR #101049)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 16 11:44:20 PDT 2024
davemgreen wrote:
> Do you currently see vectorization for three-way comparison patterns? I wouldn't really expect these to occur in vectorizable contexts.
You might be right, but all kinds of weird and wonderful things can come up at times. It would be like this, right? https://godbolt.org/z/denMv3fjf
I'm not against the patch and don't have any motivating case that needs vectorization. It might be worth adding some basic vector costmodel/isTriviallyVectorizable support at some point though.
https://github.com/llvm/llvm-project/pull/101049
More information about the llvm-commits
mailing list