[llvm-dev] how to simplify FP ops with an undef operand?

Friedman, Eli via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 28 18:33:47 PST 2018

On 2/28/2018 5:46 PM, Chris Lattner wrote:
> On Feb 28, 2018, at 3:29 PM, Kaylor, Andrew via llvm-dev 
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>> For the first part of Sanjay’s question, I think the answer is, “Yes, 
>> we can fold all of these to NaN in the general case.”
> Agreed.  Those IR instructions are undefined on SNAN, and that undef 
> could take on an SNAN value.  Folding these instructions to undef 
> seems reasonable, and it is arguable that you could even fold it to an 
> ‘unreachable'.

fdiv snan, snan is undefined?  As opposed to producing a qnan, as 
specified by IEEE-754?


Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180228/0d86d914/attachment.html>

More information about the llvm-dev mailing list