[LLVMdev] max/min intrinsics
Tim Northover
t.p.northover at gmail.com
Wed Dec 5 12:43:13 PST 2012
> It seems inevitable. For the floating point version, please make it very
> clear what the behavior of max(-0,+0) and related cases are.
Along these lines, AArch64 has an instruction "FMAXNM". It returns the
maximum if neither value is NaN, but returns the number if just one
value is NaN. This is in addition to an "FMAX" which propagates NaNs.
I suspect you'll just want to consider this as an "oh yes, make sure
that the result is NaN if either input is" advisory notice, but I
haven't actually thought through the details of implementation yet.
Tim.
More information about the llvm-dev
mailing list