[LLVMdev] confusion w.r.t. scalar evolution and nuw
David Majnemer
david.majnemer at gmail.com
Wed Jan 14 22:28:32 PST 2015
On Wed, Jan 14, 2015 at 10:14 PM, Sanjoy Das <sanjoy at playingwithpointers.com
> wrote:
> > We are permitted to turn 'sub nsw i32 %x, 1' into 'add nsw i32 %x, -1'
>
> nsw also has the same problem:
>
> sub nsw int_min, int_min is 0 but
> add nsw int_min, (-int_min) is poison
>
Right, it doesn't work with all values. I was specifically referring to
the %x and -1 case.
>
> -- Sanjoy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150114/9fa6a110/attachment.html>
More information about the llvm-dev
mailing list