https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101953
--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> --- MIPS64 does: trunc.w.d $f0,$f0 ; int c.le.d $fcc0,$f1,$f0 bc1t $fcc0,.L2 nop trunc.w.d $f0,$f0 mfc1 $2,$f0 b .L3 nop .L2: sub.d $f0,$f0,$f1 li $3,-2147483648 # 0xffffffff80000000 trunc.w.d $f0,$f0 mfc1 $2,$f0 or $2,$2,$3 .L3: ; unsigned So MIPS64 does a comparison to see if the float is greater than INT_MAX and then does a subtraction and then conversion and then adds back INT_MAX.