If half is undef, and the other half is X (either true or false), this will fall under the if statements before the call to this function in visitSELECT. Around line 4707 (isBuildVectorAll{Zeros,Ones}). I also added a comment at the call site of this function.<div>
<br></div><div>Filipe<br><div><br><br>On Wednesday, May 28, 2014, <a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a> <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
================<br>
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:4634<br>
@@ +4633,3 @@<br>
+         "One half of the selector was all UNDEFs and the other was all the "<br>
+         "same value. This should have been addressed before this function.");<br>
+  return DAG.getNode(<br>
----------------<br>
Are you sure this is always true on all possible code paths? If you are sure, please add a comment explaining where this is handled and why it will always happen first. Otherwise, please just make this a normal check.<br>

<br>
<a href="http://reviews.llvm.org/D3916" target="_blank">http://reviews.llvm.org/D3916</a><br>
<br>
<br>
</blockquote></div></div>