[PATCH] Distribute binary operators through SELECT_CC
Richard Sandiford
rsandifo at linux.vnet.ibm.com
Fri Jun 28 03:49:10 PDT 2013
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: 13007 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130628/d96fa397/attachment.bin>
More information about the llvm-commits
mailing list