[PATCH] D24491: [DAG] Allow build_vector-to-vector_shuffle combine to combine builds from two overly-wide vectors.

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 01:15:30 PDT 2016


mkuper added inline comments.

================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13054-13055
@@ +13053,4 @@
+  // only care about the low elements anyway. Pad the mask with undef.
+  for (unsigned i = NumElems; i != ShuffleNumElems; ++i)
+    Mask.push_back(-1);
+
----------------
ABataev wrote:
> ```
> if (ShuffleNumElems > NumElems)
>   Mask.append(ShuffleNumElems-NumElems, -1)
> ```
> ?
Yeah, I keep writing these loops on auto-pilot. :-)
This should either be an append, or Mask should just be initialized to -1. Thanks!


https://reviews.llvm.org/D24491





More information about the llvm-commits mailing list