https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <[email protected]>: https://gcc.gnu.org/g:ab10e6697f941d4c6a70242dcf1db1db84484113 commit r17-428-gab10e6697f941d4c6a70242dcf1db1db84484113 Author: H.J. Lu <[email protected]> Date: Sat May 9 20:58:11 2026 +0800 x86_cse: Convert vector load to constant integer load Convert vector load: (insn 14 465 412 3 (set (reg:SI 507 [ j_lsm.26 ]) (const_int 2 [0x2])) "foo.c":10:12 discrim 2 100 {*movsi_internal} (nil)) ... (insn 518 507 434 16 (set (reg:V2SI 493) (reg:V2SI 517)) 2066 {*movv2si_internal} (nil)) to constant integer load: (insn 566 55 56 6 (set (subreg:DI (reg:V2SI 517) 0) (const_int 8589934594 [0x200000002])) -1 (nil)) ... (insn 518 507 434 16 (set (reg:V2SI 493) (reg:V2SI 517)) 2066 {*movv2si_internal} (nil)) Tested on Linux/x86-64. gcc/ PR target/125238 * config/i386/i386-features.cc (ix86_broadcast_inner): Set kind to X86_CSE_CONST_VECTOR if the vector load can be converted to constant integer load. gcc/testsuite/ PR target/125238 * gcc.target/i386/pr125238.c: New test. Signed-off-by: H.J. Lu <[email protected]>
