[PATCH] D47025: [X86] Directly legalize v16i16/v8i16 vselect to vXi8 vselect to use VPBLENDVB

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 04:40:24 PDT 2018


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:15036
+  case MVT::v16i16: {
+    // Bitcast everything to the vXi8 type and use a vXi8 vselect.
+    MVT CastVT = MVT::getVectorVT(MVT::i8, VT.getVectorNumElements() * 2);
----------------
craig.topper wrote:
> RKSimon wrote:
> > Its not clear without the context - is there anything to check that numSignBits(Cond) == 16?
> Doesn't ISD::VSELECT condition have to be all 0s or all 1s? If we optimize we turn into SHRUNKBLEND which shouldn't go through here.
Ah yes you're right - "The condition follows the BooleanContent format of the target."


https://reviews.llvm.org/D47025





More information about the llvm-commits mailing list