https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105480
--- Comment #11 from Kewen Lin <linkw at gcc dot gnu.org> --- (In reply to jos...@codesourcery.com from comment #10) > For scalar isnan see bug 66462. (The claim in bug 66462 comment 19 that > there was ever a working version of that patch ready to go in is > incorrect: November 2016 is older than June 2017.) Thanks for the pointer! So it's clear that the function should not set the invalid flag for either NaN. I wonder if we should expect tree code UNORDERED_EXPR and rtx code UNORDERED have the same semantic (will not set invalid) since it's lowered to them accordingly. If yes, the current optimized dump looks fine, otherwise it's undefined for tree and rtx code? I guess it means we should lower it to something else which isn't expected to raise exceptions instead?