[PATCH] D152227: [X86] Prefer vmovmsk instead of vtest for alderlake.

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 03:43:44 PDT 2023


LuoYuanke added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:47913
   // MOVMSK(PCMPEQ(X,Y)) != -1 -> !PTESTZ(XOR(X,Y),XOR(X,Y)).
   if (IsAllOf && Subtarget.hasSSE41() && IsOneUse) {
     MVT TestVT = VecVT.is128BitVector() ? MVT::v2i64 : MVT::v4i64;
----------------
RKSimon wrote:
> What about these folds?
I'll take a look at it and I prefer to implement it in a separate patch if MOVMSK is better.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:47973
         if (IsAllOf && Result.getOpcode() == X86ISD::PCMPEQ &&
             Result.getValueType().getVectorNumElements() <= NumElts) {
           SDValue V = DAG.getNode(ISD::XOR, DL, Result.getValueType(),
----------------
RKSimon wrote:
> What about these folds?
Ditto


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152227



More information about the llvm-commits mailing list