[PATCH] D80563: [X86][SSE] Convert PTEST to MOVMSK for allsign bits vector results.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 01:02:40 PDT 2020


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

LGTM



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:40178
+            Res = DAG.getBitcast(MovmskVT, Res);
+            Res = getPMOVMSKB(DL, Res, DAG, Subtarget);
+            Res = DAG.getNode(ISD::AND, DL, MVT::i32, Res,
----------------
RKSimon wrote:
> craig.topper wrote:
> > Do we need getPMOVMSKB here or can we just use plain getNode? The only thing getPMOVMSKB does is handle AVX and BWI splitting right? But if we start from PTEST we should never need to split?
> AVX1 code can technically get here for v16i16/v32i8 cases depending how good a job SimplifyMultipleUseDemandedBits has managed. VPTEST is one of the rare 256-bit integer instructions that is available on AVX1!
Ok thanks for the clarification.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80563/new/

https://reviews.llvm.org/D80563





More information about the llvm-commits mailing list