This is the mail archive of the gcc-patches@gcc.gnu.org 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] rs6000: Add ordered compares (PR58684)


On Thu, 8 Aug 2019, Segher Boessenkool wrote:

> 2) Is it *required*, or can we delete ordered compares in some cases?
> 2a) Like, if we test a<b and a>b, we only need one compare instruction,
>     not the two that are generate right now.

Yes, you only need one ordered compare there.  The relevant text from the 
C standard Annex F is "This specification does not require support for 
trap handlers that maintain information about the order or count of 
floating-point exceptions. Therefore, between function calls, 
floating-point exceptions need not be precise: the actual order and number 
of occurrences of floating-point exceptions (> 1) may vary from what the 
source code expresses.".

-- 
Joseph S. Myers
joseph@codesourcery.com


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