https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103702
Kewen Lin <linkw at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |linkw at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED CC| |bergner at gcc dot gnu.org, | |linkw at gcc dot gnu.org, | |segher at gcc dot gnu.org, | |wschmidt at gcc dot gnu.org Ever confirmed|0 |1 Last reconfirmed| |2021-12-14 --- Comment #1 from Kewen Lin <linkw at gcc dot gnu.org> --- Confirmed. Thanks for reporting, it failed at 5457 gcc_assert (nunits > 1); the given nunits is 1. The assertion was introduced in r12-5589, which aims to ensure we only consider tweaking the cost for the vectype which has more than 1 elements (units). This issue with Power6 32bit shows that when the preferred vector mode is SImode, vectorizer will use vector(1) int as vectype and tries to vectorize scalar int load as scalar_load and further vector construction. One fix would be to bypass this kind of case with 1 nunit fed into vector construction instead of one assertion.