https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103196

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-02-25
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

--- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> ---
The extra stxvl instructions are from the function with type int8 and uint8.
The commit r12-5129 changes the vectorized loop body slightly, it makes the
later cunroll pass have different estimated sizes for the unrolled loops and
makes different decisions to unroll it completely or not.

such as: for test_npeel_int8_t

before the commit, we have:

  Loop 1 likely iterates at most 3 times.
  size: 8-2, last_iteration: 8-4
    Loop size: 8
    Estimated size after unrolling: 14
  Not unrolling loop 1: size would grow.

right after that, we have:

  Loop 1 likely iterates at most 2 times.
  size: 8-4, last_iteration: 8-4
    Loop size: 8
    Estimated size after unrolling: 8

So the vectorized loop of test_npeel_int8_t gets unrolled completely.

The fix could be to disable pass tree-cunroll for this case.

Reply via email to