https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101384
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 51146 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51146&action=edit gcc12-pr101384.patch Untested fix. easy_altivec_constant has code to try construct vector constants with different element sizes, perhaps different from CONST_VECTOR's mode. But as written, that works fine for vspltis[bhw] cases, but not for the vspltisw x,-1; vsl[bhw] x,x,x case, because that creates always a V16QImode, V8HImode or V4SImode constant containing broadcasted constant with just the MSB set. Perhaps for backports it would be best to limit the EASY_VECTOR_MSB case matching to step == 1 && copies == 1, because that is the only case the splitter handled correctly, but as can be seen in the gcc.target tests, the patch tries to handle it for all the cases.