[PATCH] Unconditionally use MAX_EXPR/MIN_EXPR for MAX/MIN intrinsics
Thomas Koenig
tkoenig@netcologne.de
Sun Aug 19 19:47:00 GMT 2018
Hi Janne,
> On Fri, Aug 10, 2018 at 11:47 PM, Janne Blomqvist <blomqvist.janne@gmail.com
>> wrote:
>
>> For floating point types, the question is what MAX(a, NaN) or MIN(a,
>> NaN) should return (where "a" is a normal number). There are valid
>> usecases for returning either one, but the Fortran standard doesn't
>> specify which one should be chosen. Also, there is no consensus among
>> other tested compilers. In short, it's a mess. So lets just do
>> whatever is fastest, which is using MAX_EXPR/MIN_EXPR which are not
>> defined to do anything in particular if one of the operands is a NaN.
>>
>> Regtested on x86_64-pc-linux-gnu, Ok for trunk?
OK.
Could you also document this behavior in the "Compiler Characteristics"
section, and make mention of the change in gcc-9/changes.html ?
Regards
Thomas
More information about the Gcc-patches
mailing list