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

Hans Wennborg hans at chromium.org
Thu Jan 22 09:00:13 PST 2015


On Wed, Jan 21, 2015 at 4:48 PM, Sanjoy Das
<sanjoy at playingwithpointers.com> wrote:
> Author: sanjoy
> Date: Wed Jan 21 18:48:47 2015
> New Revision: 226755
>
> URL: http://llvm.org/viewvc/llvm-project?rev=226755&view=rev
> Log:
> Make ScalarEvolution less aggressive with respect to no-wrap flags.
>
> 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 two test cases demonstrating the bug.
>
> Differential Revision: http://reviews.llvm.org/D7081

I've merged this to the 3.6 branch in r226839, as discussed on the code review.



More information about the llvm-commits mailing list