Gentle ping. This is a dependency of the predicated BB SLP patch series (which it was for many months also a part of).

On 17/07/2026 14:31, Christopher Bazley via Sourceware Forge wrote:
Hi gcc-patches mailing list,
Christopher Bazley via Sourceware Forge 
<[email protected]> has requested that the 
following forgejo pull request
be published on the mailing list.

Created on: 2026-07-17 13:09:28+00:00
Latest update: 2026-07-17 13:31:03+00:00
Changes: 1 changed files, 38 additions, 23 deletions
Head revision: chris.bazley/gcc ref promotion commit 
8e37fb681d65c862e2c006bcf1b1ac0ed205c78a
Base revision: gcc/gcc ref trunk commit 
4c85f7cf587f0f62a5eb1884998d4ed30a39552a r17-2493-g4c85f7cf587f0f
Merge base: 4c85f7cf587f0f62a5eb1884998d4ed30a39552a
Full diff url: https://forge.sourceware.org/gcc/gcc/pulls/191.diff
Discussion:  https://forge.sourceware.org/gcc/gcc/pulls/191
Requested Reviewers:

vect_create_vectorized_promotion_stmts no longer pushes
more stmts than implied by vect_get_num_copies because it could
previously overrun the number of slots allocated for an SLP node
(based on its number of lanes and type). e.g., four defs were
pushed for a promotion of V8HI to V2DI (8/2=4) even if only two
lanes of the V8HI were active. Allowing it later caused ICE in
vectorizable_operation for a parent node, because binary ops
require both operands to be the same length.

Since promotion no longer produces redundant definitions,
vectorizable_conversion also had to be modified so that demotion no
longer relies on an even number of defs being produced. If
necessary, it now pushes a single constant zero def.

gcc/ChangeLog:

        * tree-vect-stmts.cc (vect_create_vectorized_promotion_stmts):
        Require an SLP tree node to be passed by the caller, for use
        by vect_get_num_copies.  Stop pushing more stmts than implied
        by vect_get_num_copies.
        (vectorizable_conversion): Pass SLP tree node to
        vect_create_vectorized_promotion_stmts.  Demotion no longer
        relies on an even number of definitions being produced by
        promotion. If necessary, push a single constant zero
        definition.


Changed files:
- M: gcc/tree-vect-stmts.cc


Christopher Bazley (1):
   vect: Prepare promotion/demotion for BB SLP with predicated tails

  gcc/tree-vect-stmts.cc | 61 ++++++++++++++++++++++++++----------------
  1 file changed, 38 insertions(+), 23 deletions(-)



--
Christopher Bazley
Staff Software Engineer, GNU Tools Team.
Arm Ltd, 110 Fulbourn Road, Cambridge, CB1 9NJ, UK.
http://www.arm.com/

Reply via email to