[PATCH] D123801: [DAG] Combine shuffle(bitcast(X), Mask) to bitcast(shuffle(X, Mask'))

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 16 07:05:09 PDT 2022


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:21968
+  }
+
+  // Create the new shuffle with the new mask and bitcast it bask to the
----------------
We need a TLI.isShuffleMaskLegal check?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:22381
   // back to their original types.
   if (N0.getOpcode() == ISD::BITCAST && N0.hasOneUse() &&
       N1.isUndef() && Level < AfterLegalizeVectorOps &&
----------------
We already have this - maybe we'd be better off adding support for binary bitcasted shuffles here?


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

https://reviews.llvm.org/D123801



More information about the llvm-commits mailing list