https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127897
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by hongtao Liu <[email protected]>: https://gcc.gnu.org/g:b2f4da30289466ed982464203d5e552f83421fe8 commit r17-5317-gb2f4da30289466ed982464203d5e552f83421fe8 Author: liuhongt <[email protected]> Date: Thu Oct 15 00:29:50 2026 -0700 i386: Avoid emulated broadcasts of vector constants [PR127897] Only broadcast floating-point constants when a broadcast instruction is available (AVX, or AVX2 for 16-bit elements), avoiding sequences such as movss + shufps. For integer constants, guard broadcasting with TARGET_PREFER_BCST_FROM_INTEGER. PR target/127897 gcc/ChangeLog: * config/i386/i386-expand.cc (ix86_expand_vector_move): Only broadcast floating-point constants when a broadcast instruction is available. Guard integer broadcasts with TARGET_PREFER_BCST_FROM_INTEGER. gcc/testsuite/ChangeLog: * gcc.target/i386/pr127897-1.c: New test. * gcc.target/i386/pr127897-2.c: Likewise. * gcc.target/i386/pr127897-3.c: Likewise.
