[PATCH] Distribute binary operators through SELECT_CC

Richard Sandiford rsandifo at linux.vnet.ibm.com
Mon Jul 8 01:54:51 PDT 2013


Ping 2.

Richard Sandiford <rsandifo at linux.vnet.ibm.com> writes:
> This patch transforms something like:
>
>   (add (select_cc X, Y, 10, 20, CC), 10)
>
> into:
>
>   (select_cc X, Y, 20, 30, CC)
>
> but generalised for a tree of select_ccs.  It allows at most one of
> the selected values to be non-constant.
>
> If this goes in, I'd like to follow it with patches to handle unary
> operations and floating-point binary operations in the same way.
>
> The main motivation was to optimise operations on scalarised vector
> selects.  It also changed the output of the R600/alu-shift.ll test that
> Tom removed earlier.  Tom reckoned the new code was an improvement
> (but defeated the original purpose of that test).
>
> Thanks,
> Richard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: distribute-select-binary.patch
Type: text/x-patch
Size: 12982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130708/5285a624/attachment.bin>


More information about the llvm-commits mailing list