[llvm-commits] [llvm] r76495 - /llvm/trunk/docs/LangRef.html

Dan Gohman gohman at apple.com
Wed Jul 22 15:47:32 PDT 2009


On Jul 22, 2009, at 1:23 AM, Duncan Sands wrote:


> Chris Lattner wrote:
>
>> On Jul 20, 2009, at 3:41 PM, Dan Gohman wrote:
>>
>>
>>
>>> Author: djg
>>>
>>> Date: Mon Jul 20 17:41:19 2009
>>>
>>> New Revision: 76495
>>>
>>>
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=76495&view=rev
>>>
>>> Log:
>>>
>>> Documentation for the new non-overflow and exact keywords.
>>>
>>
>>
>> Dan, is "signed add" really the best mnemonic for this?  This doesn't
>>
>> imply "undefined on overflow" to me at all.  What about something  
>> like:
>>
>>
>>
>>  %X = add undef_s i32 %A, %B
>>
>>
>>
>> or something like that?  CAn you really have "%X = add signed  
>> unsigned
>>
>> i32 %A, %B"?

Yes, this means that %A + %B doesn't undergo either signed or unsigned
overflow. It won't be very common to have both flags set, but the
optimizer happens to know both are true, it may set both.

>>
>
> how about no_s_overflow?  The problem with undef_s is that it doesn't
> give much of a clue to why you are getting undef.

Ok, I got several responses and suggestions here. I changed them to
nuw and nsw. How's that? They are short, and less misleading at least.

Dan





More information about the llvm-commits mailing list