[PATCH] Convert a vselect into a concat_vector if possible

Filipe Cabecinhas filcab+llvm.phabricator at gmail.com
Wed May 28 00:48:13 PDT 2014


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.

Filipe


On Wednesday, May 28, 2014, hfinkel at anl.gov <hfinkel at anl.gov> wrote:

> ================
> Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:4634
> @@ +4633,3 @@
> +         "One half of the selector was all UNDEFs and the other was all
> the "
> +         "same value. This should have been addressed before this
> function.");
> +  return DAG.getNode(
> ----------------
> 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.
>
> http://reviews.llvm.org/D3916
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140528/75833562/attachment.html>


More information about the llvm-commits mailing list