[PATCH] D104156: [DAGCombine][X86][ARM] EXTRACT_SUBVECTOR(VECTOR_SHUFFLE(?,?,Mask)) -> VECTOR_SHUFFLE(EXTRACT_SUBVECTOR(?, ?), EXTRACT_SUBVECTOR(?, ?), Mask')

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 5 23:23:40 PST 2021


lebedev.ri added a comment.

ping



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:20684
+      !TLI.isOperationLegalOrCustom(ISD::VECTOR_SHUFFLE, NarrowVT))
+    return SDValue();
+
----------------
RKSimon wrote:
> lebedev.ri wrote:
> > RKSimon wrote:
> > > Shouldn't this be done earlier as soon as we know NarrowVT to early-out ?
> > Well, yes and no. As it can be seen in the comment for the previous code block,
> > we then would loose `return DAG.getUNDEF(NarrowVT);` constant-fold case.
> > Should we not have it?
> I suppose it depends if these UNDEF paths are actually active?
https://reviews.llvm.org/D104156#inline-1078555, but is the comment that some generic handling
should catch such cases regardless? I can drop it if that's the case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104156



More information about the llvm-commits mailing list