[Bug target/127177] __builtin_isinf vectorization incorrectly signals FE_INVALID
mkretz at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 1 18:50:30 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127177
Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
--- Comment #3 from Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> ---
I just added an isinf unit test to the std::simd testsuite and it fails when
GCC vectorizes 4 calls to std::isinf because it raises FE_INVALID, on
isinf(nan). IIUC, slp2 generates
vect__2.4_28 = ABS_EXPR <x_17(D)>;
mask__3.5_29 = vect__2.4_28 u<= {
3.4028234663852885981170418348451692544e+38,
3.4028234663852885981170418348451692544e+38,
3.4028234663852885981170418348451692544e+38,
3.4028234663852885981170418348451692544e+38 };
and that u<= is subsequently translated into vcmpnltps, which is <= not u<=. Is
there a reason that it doesn't compare against infinity?
More information about the Gcc-bugs
mailing list