[LLVMdev] Float undef value propagation

Philip Reames listmail at philipreames.com
Thu Dec 12 16:57:19 PST 2013


On 12/11/13 12:40 PM, Owen Anderson wrote:
>
> On Dec 11, 2013, at 12:33 PM, Tim Northover <t.p.northover at gmail.com 
> <mailto:t.p.northover at gmail.com>> wrote:
>
>> On 11 December 2013 20:25, Raoux, Thomas F <thomas.f.raoux at intel.com 
>> <mailto:thomas.f.raoux at intel.com>> wrote:
>>> Well in IEEE-754 Nan + any value returns Nan, so doing Nan + undef 
>>> -> undef is wrong.
>>
>> I see what you mean having re-read the language reference. It looks
>> like LLVM's "undef" has to be *some* bitpattern at any point, and that
>> allows IEEE room to come in and say what the result is.
>
> To generalize this, undef can be any bit pattern, but it still has to 
> respect universal constraints of its type.  This means that predicates 
> that are true /for all/ /values of a type/ must also be true for 
> undef.  Because NaN + x == NaN is true for all values of x, it must 
> also be true for undef.
Seems like this might be another pattern to consider adding (if we don't 
already have it.)

Just to review the patterns which we've discussed so far:
NaN + any == NaN
undef + any == NaN (since undef can be NaN) or undef + any (since undef 
could be zero)

Philip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131212/f120776b/attachment.html>


More information about the llvm-dev mailing list