[LLVMdev] Float undef value propagation

Owen Anderson resistor at mac.com
Wed Dec 11 12:40:58 PST 2013


On Dec 11, 2013, at 12:33 PM, Tim Northover <t.p.northover at gmail.com> wrote:

> On 11 December 2013 20:25, Raoux, Thomas F <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.

—Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131211/3a663359/attachment.html>


More information about the llvm-dev mailing list