https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86509
--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> --- Ops, no, the above is with gcc-7.3. gcc-9 correctly emits: x.0_1 ={v} x; _2 = x.0_1 u<= 1.79769313486231570814527423731704356798070567525844996599e+308; _3 = (int) _2; i ={v} _3; _4 = fetestexcept (131072); which is later compiled to branchless code: cmptun/su $f11,$f10,$f12 ftoit $f12,$2 cmptle/su $f11,$f10,$f12 cmpult $31,$2,$2 ftoit $f12,$1 cmovne $1,1,$2 Unfortunately, cmptle generates exception, so the testcase aborts.