[PATCH] D29729: [InstCombine] don't lose nsw/nuw from add by converting to xor

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 15:25:14 PST 2017


spatel added a comment.

In https://reviews.llvm.org/D29729#671286, @efriedma wrote:

> We don't want to go down the path of forbidding optimizations on add/sub because we can deduce the operation doesn't overflow.  There's been a lot of activity recently surrounding the representation of predicates/assertions/etc.; the right solution probably lies in that direction.


Let me make sure I'm not completely lost. I'm working on an instcombine icmp+add patch that relies on nsw to eliminate the add:
https://godbolt.org/g/yzoxeY

Should I not pursue that because the transform relies on nsw?


https://reviews.llvm.org/D29729





More information about the llvm-commits mailing list