[PATCH] D29489: Optimize SETCC + VSEL of incompatible or illegal types

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 12:40:22 PST 2017


efriedma added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6261
+    // element type.
+    if (N0->getOpcode() == ISD::BUILD_VECTOR) {
+      for (unsigned i = 0, e = N0->getNumOperands(); i != e; ++i) {
----------------
It seems like it would be simpler to produce the correct code in the first place, rather than vectorize the result which was scalarized by legalization.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:7604
+       TargetLoweringBase::ZeroOrNegativeOneBooleanContent))
+    return N0;
+
----------------
This doesn't make any sense; you can't assume an arbitrary vector is all zeros or all ones.


https://reviews.llvm.org/D29489





More information about the llvm-commits mailing list