[Bug target/103702] [12 Regression] ICE in update_target_cost_per_stmt, at config/rs6000/rs6000.c:5457

linkw at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 14 08:50:50 GMT 2021


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.


More information about the Gcc-bugs mailing list