[PATCH] [DAGCombiner] Combine shuffles of BUILD_VECTOR and SCALAR_TO_VECTOR

Simon Pilgrim llvm-dev at redking.me.uk
Tue Mar 24 04:49:09 PDT 2015


Updated patch


REPOSITORY
  rL LLVM

================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:12032
@@ +12031,3 @@
+    }
+    if (Ops.size() == VT.getVectorNumElements()) {
+      // Create SCALAR_TO_VECTOR if the only defined input is input[0].
----------------
I ended up keeping this in as it makes for much easier understanding than all the conditions I would have to add to the if() test. I've added a comment explaining the 'bail out' to make it clearer.

http://reviews.llvm.org/D8516

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list