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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:9216ee6d1195d48388f825cf1b072e570129cbbe

commit r12-3116-g9216ee6d1195d48388f825cf1b072e570129cbbe
Author: Richard Biener <rguent...@suse.de>
Date:   Tue Aug 24 12:25:25 2021 +0200

    tree-optimization/100089 - avoid leaving scalar if-converted code around

    This avoids leaving scalar if-converted code around for the case
    of BB vectorizing an if-converted loop body when using the very-cheap
    cost model.  In this case we scan not vectorized scalar stmts in
    the basic-block vectorized for COND_EXPRs and force the vectorization
    to be marked as not profitable.

    The patch also makes sure to always consider all BB vectorization
    subgraphs together for costing purposes when vectorizing an
    if-converted loop body.

    2021-08-24  Richard Biener  <rguent...@suse.de>

            PR tree-optimization/100089
            * tree-vectorizer.h (vect_slp_bb): Rename to ...
            (vect_slp_if_converted_bb): ... this and get the original
            loop as new argument.
            * tree-vectorizer.c (try_vectorize_loop_1): Revert previous fix,
            pass original loop to vect_slp_if_converted_bb.
            * tree-vect-slp.c (vect_bb_vectorization_profitable_p):
            If orig_loop was passed scan the not vectorized stmts
            for COND_EXPRs and force not profitable if found.
            (vect_slp_region): Pass down all SLP instances to costing
            if orig_loop was specified.
            (vect_slp_bbs): Pass through orig_loop.
            (vect_slp_bb): Rename to ...
            (vect_slp_if_converted_bb): ... this and get the original
            loop as new argument.
            (vect_slp_function): Adjust.

Reply via email to