https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127649
--- Comment #3 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:30bdb83cf272c702487a72a715890994056319fe commit r17-5211-g30bdb83cf272c702487a72a715890994056319fe Author: Hongyu Wang <[email protected]> Date: Mon Oct 12 17:14:56 2026 +0800 i386: Raise FE_INVALID for vector LTGT compares [PR127649] LTGT is a signaling compare and must raise FE_INVALID on a quiet NaN, like the scalar comiss it expands to. The vector expansion used quiet compares instead: NEQ_OQ for AVX and AVX512, and ORDERED & NE for SSE. Use the signaling NEQ_OS predicate for AVX and AVX512. Legacy SSE has no ordered not-equal predicate, so expand LTGT as LT | GT, which uses the signaling cmpltps and needs no extra instruction. gcc/ChangeLog: PR target/127649 * config/i386/i386-expand.cc (ix86_fp_cmp_code_to_pcmp_immediate): Use NEQ_OS for LTGT. (ix86_expand_fp_vec_cmp): Expand LTGT as LT | GT. * config/i386/i386.cc (ix86_print_operand): Print neq_os for LTGT. gcc/testsuite/ChangeLog: PR target/127649 * gcc.target/i386/pr127649-1.c: New test. * gcc.target/i386/pr127649-2.c: Likewise.
