https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101479
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Simon Thornington from comment #4) > I'll add that changing close_to_zero from > > fabs(x) < 0.5 > > to > > x == 0.0 || fabs(x) < 0.5 > > everything starts to work as I'd expect again... Yes because it is not vectorized. Again if you want keep traps/exceptions use -ftrapping-math if you use -Ofast or -ffast-math.