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 jos...@codesourcery.com