https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120231
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Alex Coplan from comment #6) > I suppose that example boils down to whether code like: > > _Bool f(_Float16 a) { > return a * a >= 0; > } > _Bool g(float a) { > return a * a >= 0; > } > > can be optimised to return true. We currently do it with -ffast-math but > not without. And it is correct like that. If a is a NaN (qNaN or sNaN), then a * a >= 0 is false.