[PATCH] [Multiprecision Arithmetic Optimization] Teach SelectionDAG how to promote the integer carry result of {add, sub}{c, e} to a larger integer type.
Michael Gottesman
mgottesman at apple.com
Wed May 15 14:30:41 PDT 2013
On May 15, 2013, at 2:04 PM, Owen Anderson <resistor at mac.com> wrote:
> LGTM, with two comments:
>
>> - SDValue Ops[] = { N->getOperand(0), N->getOperand(1) };
>> + const unsigned NumOperands = N->getNumOperands();
>> + SDValue Ops[3] = { N->getOperand(0), N->getOperand(1) };
>> + if (NumOperands == 3)
>> + Ops[2] = N->getOperand(2);
>
> It took me a while to figure out what case this was handling. Perhaps it merits a comment?
I will add it.
>
> Second, is it possible to write a test for this functionality? I know that there are dependent patches incoming, but it would be good to test each patch independently as much as possible.
There are no IR intrinsics that lower directly to {add,sub}{c,e} directly. That is the whole point of this stream of patches, so I don't think I can write any tests for this = (.
So if I add the comment, LGTM?
Michael
>
> --Owen
>
> On May 15, 2013, at 10:37 AM, Michael Gottesman <mgottesman at apple.com> wrote:
>
>> The attached patch teaches selection DAG how to promote the integer carry result of an {add,sub}{c,e} node to a larger integer type. It is a part of a larger set of patches that I will be committing over the next little bit to enable the optimization of uaddo/usubo chains.
>>
>> Please Review,
>> Michael
>>
>> <0001-Teach-SelectionDAG-how-to-promote-the-integer-carry-.patch>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130515/6ed198cd/attachment.html>
More information about the llvm-commits
mailing list