[llvm-commits] PATCH: Preserving the 'nsw' flag in the instruction combiner.

Nick Lewycky nicholas at mxc.ca
Sat Aug 13 18:46:22 PDT 2011


Pranav Bhandarkar wrote:
> Hi Nick,
>
>>> How about:
>>>
>>>
>>>    bool NSW = MaintainNoSignedWrap(I, B, C);
>>>    I.clearSubclassOptionalData();
>>>    I.setHasNoSignedWrap(NSW);
>
> I have incorporated all of your suggestions except this one above. The
> reason is that MaintainNoSignedWrap() checks if I is an
> OverflowingBinaryOperator and therefore a call to setHasNoSignedWrap()
> should be gated with a call to MaintainNoSignedWrap(). Not doing so causes
> an assert inside setHasNoSignedWrap to fail.
>
> I have attached the revised patch here. Please do verify if it is fit to be
> committed.
>
> Thanks for your comments.

Thank you! I've committed this in r137570.

Nick

> Pranav
>
> Qualcomm Innovation Center, Inc is a member of Code Aurora Forum.




More information about the llvm-commits mailing list