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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 11:26:10 PDT 2020


RKSimon marked an inline comment as done.
RKSimon added inline comments.


================
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,
----------------
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!


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