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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 17 15:30:42 PDT 2018


craig.topper added inline comments.


================
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);
----------------
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.


https://reviews.llvm.org/D47025





More information about the llvm-commits mailing list