On Mon, May 12, 2025 at 06:35:15PM -0400, Michael Meissner wrote: > On Mon, May 12, 2025 at 01:24:04PM +0530, Surya Kumari Jangala wrote: > > Hi Mike, > > Irrespective of whether -Ofast is used or not, should’nt we generate > > XSCMPUDP instruction for ‘isgreater()’ operation? This is because XSCMPGTDP > > insn will generate a trap if either operand is an SNaN or a QNaN. Whereas, > > XSCMPUDP insn will generate a trap only if either operand is an SNaN. The > > issue with the failing glibc tests is that an “Invalid operation” exception > > is being thrown due to qNaNs. > > But -Ofast says not to worry about Nans (signalling or otherwise). But if > Segher desires, I remove the test for Ofast.
That is not what either of the five constituent options of -ffast-math means. Any code should use (some of) those five options, almost never -ffast-math instead, and absolutely never -Ofast (which is just a meaningless shorthand for people who have no idea what they are doing). Segher