https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128985
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Hongyu Wang <[email protected]>: https://gcc.gnu.org/g:48688cfeadf6ec3b2dd22783f5048db6fc444d04 commit r17-6711-g48688cfeadf6ec3b2dd22783f5048db6fc444d04 Author: Hongyu Wang <[email protected]> Date: Tue Nov 24 16:25:45 2026 +0800 i386: Compare BFmode EQ/NE in SFmode when NaNs are honored [PR128985] vcomisbf16 sets the flags like comiss, so EQ and NE need both ZF and PF, but under -mavx10.2 -fno-trapping-math they were treated as single-flag tests and NaN operands compared equal. Convert BFmode EQ/NE to SFmode when HONOR_NANS then vucomxss handles it with one flag correctly. gcc/ChangeLog: PR target/128985 * config/i386/i386-expand.cc (ix86_prepare_fp_compare_args): Convert BFmode EQ/NE to SFmode under AVX10.2 when NaNs are honored. gcc/testsuite/ChangeLog: PR target/128985 * gcc.target/i386/avx10_2-comibf-1.c: Adjust scan. * gcc.target/i386/avx10_2-comibf-3.c: Likewise. * gcc.target/i386/avx10_2-comibf-2.c: Test NaN. * gcc.target/i386/avx10_2-comibf-5.c: New test. * gcc.target/i386/avx10_2-comibf-6.c: Likewise.
