[PATCH] PR16258 - fadd with undef not folded
Stephen Canon
scanon at apple.com
Mon Jun 10 08:53:05 PDT 2013
On Jun 10, 2013, at 8:50 AM, Duncan Sands <baldrick at free.fr> wrote:
>>> If undef can't be achieved, it might still be possible to fold to a NaN
>>> or some other special value.
>>
>> Folding to NaN sounds workable to me.
>
> So if Y is a well-chosen NaN (or will any NaN do?) then fadd X, Y will always
> be equal to Y? Does the same go for fmul, fsub and fdiv?
If Y is any NaN, then the result of any IEEE-754 basic operation (add, sub, mul, div, sqrt, ... ) will be NaN (it will not “be equal to Y", because NaNs compare unequal to everything).
- Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130610/9632d37a/attachment.html>
More information about the llvm-commits
mailing list