[llvm-dev] Question regarding nuw and nsw

via llvm-dev llvm-dev at lists.llvm.org
Sun Dec 2 07:30:21 PST 2018


in the language reference some instructions have the following note :
´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.´

I understand how integer overflow works generally but i am not sure 
whats the difference between Unsigned and Signed Wrap. Could someone 
explain this ?

Thank you

More information about the llvm-dev mailing list