[NFC][InstSimplify] Add tests for add nuw %x, -1 -> -1 fold.
%ret = add nuw i8 %x, C From langref: nuw and nsw stand for “No Unsigned Wrap” and “No Signed Wrap”, respectively. If the nuw and/or nsw keywords are present, the result value of the add is a poison value if unsigned and/or signed overflow, respectively, occurs. So if C is -1, %x can only be 0, and the result is always -1. https://rise4fun.com/Alive/sldC Was mentioned in D47428 review. llvm-svn: 334236
Loading
Please sign in to comment