This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch to fix rtl documentation for new floating point comparisons

On 02/14/2015 03:26 PM, Paolo Bonzini wrote:

On 10/02/2015 22:46, Joseph Myers wrote:
It may make sense to define LTGT as exactly !UNEQ, and so quiet, but the
choice of definition is a matter of what's convenient for the
implementation (and which choice you make determines which existing code
in GCC should be considered incorrect).
It would be different from e.g. !UNLT and GE differing only in that UNLT
is quiet and GE is signaling.  So it makes sense to me to keep LTGT as
while in theory, your argument is correct, in practice, this is not how people use this stuff and so i disagree.

The interrupts are there to allow legacy code that does not know about nans to be "run" in a mode where the nans can be used to signal that things did not run well. Properly written floating point aware code never uses the interrupts. In that code, you want a rich set of comparisons which allow the programmer to efficiently deal with the fact that any comparison can go one of 4 possible ways.

to support legacy code we need ne and eq to be quiet and lt gt le ge to be noisy. This is what the standards call for and this is what gcc delivers. Going beyond that for legacy code is a waste of time.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]