[PATCH] Make ScalarEvolution less aggressive with respect to no-wrap flags.

Hans Wennborg hans at chromium.org
Wed Jan 21 13:27:31 PST 2015


Okay, please cc me when this lands so we can get it merged.

On Wed, Jan 21, 2015 at 10:14 AM, David Majnemer
<david.majnemer at gmail.com> wrote:
> They could potentially hit it, yes.  I think this fix is very low risk, no
> reason not to merge it.
>
> On Wed, Jan 21, 2015 at 10:09 AM, Hans Wennborg <hans at chromium.org> wrote:
>>
>> On Wed, Jan 21, 2015 at 12:25 AM, Sanjoy Das
>> <sanjoy at playingwithpointers.com> wrote:
>> > Hi atrick, majnemer,
>> >
>> > ScalarEvolution currently lowers a subtraction recurrence to an add
>> > recurrence with the same no-wrap flags as the subtraction.  This is
>> > incorrect because `sub nsw X, Y` is not the same as `add nsw X, -Y` and `sub
>> > nuw X, Y` is not the same as `add nuw X, -Y`.  This patch fixes the issue,
>> > and adds a test case demonstrating the bug.
>> >
>> > http://reviews.llvm.org/D7081
>>
>> Is this fixing a bug that's present on the 3.6 branch and that users
>> could potentially hit, i.e. should we merge this fix?
>>
>> Thanks,
>> Hans
>
>



More information about the llvm-commits mailing list