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

David Majnemer david.majnemer at gmail.com
Wed Jan 21 10:14:45 PST 2015


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150121/33582fb2/attachment.html>


More information about the llvm-commits mailing list