[PATCH] [x86] Simplify vector selection

Chandler Carruth chandlerc at google.com
Tue Sep 30 11:04:25 PDT 2014

This patch doesn't really make sense to me...

On Tue, Sep 30, 2014 at 10:26 AM, Robert Khasanov <rob.khasanov at gmail.com>

> [x86] Simplify vector selection if condition value type matches vselect
> value type and true value is all ones or false value is all zeros.
> This transformation worked if selector is produced by SETCC, however SETCC
> is needed only if we consider to swap operands. So I replaced SETCC check
> for this case.

What is your actual goal here?

> Also I removed special case for cmp instructions in getVectorMaskingNode.
> Now cmp intrinsics lower as other intrinsics through VSELECT, and then
> VSELECT tranforms to AND in PerformSELECTCombine.

This should be a separate patch.

> New tests are not added, existed intrinsics tests on vpcmpeq{bwdq} cover
> these cases.

I don't get it.

Does this patch have no functional impact? If so, say so, and justify both
why it should have no functional impact and why the refactoring is
desirable? The change looks like it *should* have functional impact...

Also, you did see the recent churn on VSELECT? I'm planning to implement
the new plan I outlined in my commit log. It would be great for you to
review those patches and the plan I outlined and comment on it (I asked for
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140930/3a6cb50c/attachment.html>

More information about the llvm-commits mailing list