[PATCH] SCEVExpander incorrectly marks increment operations as no-wrap

Sanjoy Das sanjoy at playingwithpointers.com
Wed Feb 25 21:08:39 PST 2015


Another related problem is with how SCEVExpander will sometimes emit
subtractions instead of additions.  As you know, nuw and nsw flags
don't carry over from 'add X (-Y)' to 'sub X Y'.  There are two
obvious ways out of this:

 * don't generate subtractions
 * if you do generate a subtraction, don't tag it with nuw/nsw even if
the addition is nuw/nsw.

The question I do not have the answer to is why SCEVExpander generates
subtractions at all.  Is the a code-gen issue?


On Mon, Feb 23, 2015 at 11:51 AM, Andrew Trick <atrick at apple.com> wrote:
> LGTM
>
>
> http://reviews.llvm.org/D7778
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>



More information about the llvm-commits mailing list