https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115161
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I don't think the cost of using UNSPEC would be significant if the backend tried to constant fold more target builtins. Anyway, with the proposed changes perhaps you could keep using FIX/UNSIGNED_FIX for flag_trapping_math case even for the intrinsics and use UNSPECs only for !flag_trapping_math.