https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115161
--- Comment #16 from Hongtao Liu <liuhongt at gcc dot gnu.org> --- > > That said, this change really won't help the backend which supposedly should > have the same behavior regardless of -fno-trapping-math, because in that > case it is the value > of the result (which is unspecified by the standards) rather than whether an > exception is triggered or not. First, I agree with you, they're 2 separate issues. What I proposed is just trying to find a balance that makes it possible not to refine all cvtt* instructions to UNSPEC, because that would lose a lot of optimization opportunities. If it can be restricted under flag_trapping_math, at least those intrinsics are fine at O2/O3.