[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics

Owen Anderson resistor at mac.com
Mon Sep 15 13:17:11 PDT 2014


I’d be fine with that proposal.  I could even be convinced if we wanted to add a pair of NaN-propagating intrinsics as well, for targets and languages that want those semantics, even if I disagree with them.  I do think that, if we are using the minnum/maxnum names, we should explicitly note that they are equivalent to C’s fmin/fmax, but not std::min/std::max or Java(script)’s min/max.

—Owen


> On Sep 15, 2014, at 12:26 PM, Dan Gohman <dan433584 at gmail.com> wrote:
> 
> Given IEEE-754's sway, and its saying what it does on this point, but given also the popularity of NaN-propagating min and max, how about a compromise? We add intrinsics following the IEEE-754 semantics, but we also follow IEEE-754 (and ARMv8) in renaming them to minnum and maxnum, to clarify which interpretation these intrinsics are using.





More information about the llvm-dev mailing list