> -----Original Message----- > From: H.J. Lu <[email protected]> > Sent: Sunday, May 10, 2026 8:38 AM > To: GCC Patches <[email protected]>; Uros Bizjak > <[email protected]>; Liu, Hongtao <[email protected]> > Subject: [PATCH] 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.
Ok. > > 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. > > -- > H.J.
