[PATCH] D55274: [DagCombiner][X86] Simplify a ConcatVectors of a scalar_to_vector with undef.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 4 08:47:58 PST 2018


RKSimon added a comment.

Maybe call the test file combine-concatvectors.ll ? That matches the other filenames we have.



================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:16327
+        Op0.getOperand(0).hasOneUse() &&
+        Op0.getOperand(0).getOpcode() == ISD::SCALAR_TO_VECTOR) {
+      bool AllUndefs =
----------------
Use peekThroughOneUseBitcasts ?


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:16342
+    }
+  }
+
----------------
This is all very similar to concat_vectors(scalar, undef) -> scalar_to_vector(sclr) at the beginning of visitCONCAT_VECTORS


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

https://reviews.llvm.org/D55274





More information about the llvm-commits mailing list