[llvm-dev] how to simplify FP ops with an undef operand?
Chris Lattner via llvm-dev
llvm-dev at lists.llvm.org
Wed Feb 28 17:46:38 PST 2018
On Feb 28, 2018, at 3:29 PM, Kaylor, Andrew via llvm-dev <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'.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev