[PATCH] D42090: [DAGCombiner] Add a DAG combine to turn a splat build_vector where the splat elemnt is a bitcast from a vector type into a concat_vector

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 09:48:46 PST 2018


RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14952
+  // concat_vector.
+  if (SDValue Splat = cast<BuildVectorSDNode>(N)->getSplatValue()) {
+    if (Splat.getOpcode() == ISD::BITCAST) {
----------------
Also, should this be limited to before LegalOperations in case a backend is trying to do this in reverse?


https://reviews.llvm.org/D42090





More information about the llvm-commits mailing list