[PATCH] D83181: [x86] improve codegen for non-splat bit-masked vector compare and select (PR46531)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 5 13:20:07 PDT 2020


spatel created this revision.
spatel added reviewers: RKSimon, craig.topper, lebedev.ri.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.

vselect ((X & Pow2C) == 0), LHS, RHS --> vselect ((shl X, C') < 0), RHS, LHS

Follow-up to D83073 <https://reviews.llvm.org/D83073> - the non-splat mask cases where we actually see an improvement are quite limited from what I can tell. AVX1 needs multiply and blend capabilities and AVX2 needs vector shift and blend capabilities. The intersection of those 2 constraints is only vectors with 32-bit or 64-bit elements.


https://reviews.llvm.org/D83181

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/vselect-pcmp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83181.275568.patch
Type: text/x-patch
Size: 6454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200705/32447ccd/attachment.bin>


More information about the llvm-commits mailing list