On Thu, Jun 26, 2025 at 1:59 PM H.J. Lu <hjl.to...@gmail.com> wrote: > > Use the inner scalar mode of vector broadcast source in: > > (set (reg:V8DF 394) > (vec_duplicate:V8DF (reg:V2DF 190 [ alpha ]))) > > to compute the vector mode for broadcast from vector source.
ix86_get_vector_cse_mode (unsigned int size, machine_mode smode) { + /* Use the inner scalar mode of vector broadcast source in: + + (set (reg:V8DF 394) + (vec_duplicate:V8DF (reg:V2DF 190 [ alpha ]))) + + to compute the vector mode for broadcast from vector source. + */ + if (VECTOR_MODE_P (smode)) + smode = GET_MODE_INNER (smode); I think we need to figure out why vector mode is passed to ix86_get_vector_cse_mode and fix there. > > gcc/ > > PR target/120830 > * config/i386/i386-features.cc (ix86_get_vector_cse_mode): Handle > vector broadcast source. > > gcc/testsuite/ > > PR target/120830 > * g++.target/i386/pr120830.C: New test. > > OK for master? > > -- > H.J. -- BR, Hongtao