public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/105940] suggested_unroll_factor applying place looks wrong
Date: Mon, 20 Jun 2022 12:45:29 +0000	[thread overview]
Message-ID: <bug-105940-4-RuYiRHdsSG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105940-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

https://gcc.gnu.org/g:86882d9feb6a534325d7162216696266898e36d0

commit r13-1173-g86882d9feb6a534325d7162216696266898e36d0
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Mon Jun 20 07:44:21 2022 -0500

    vect: Respect slp decision when applying suggested uf [PR105940]

    This follows Richi's suggestion in PR105940, it aims to avoid
    inconsistent slp decision between when the suggested unroll
    factor is worked out and when the suggested unroll factor is
    applied.

    If the previous slp decision is true when the suggested unroll
    factor is worked out, when we are applying unroll factor we
    don't need to start over with slp off if the analysis with slp
    on fails.  On the other hand, if the previous slp decision is
    false when the suggested unroll factor is worked out, when we
    are applying unroll factor we can skip the slp handlings.

    Function vect_is_simple_reduction saves reduction chains for
    subsequent slp analyses, we have to disable this early otherwise
    there is an ICE in vectorizable_reduction for below:

      if (REDUC_GROUP_FIRST_ELEMENT (stmt_info))
        gcc_assert (slp_node
                    && REDUC_GROUP_FIRST_ELEMENT (stmt_info)
                       == stmt_info);

            PR tree-optimization/105940

    gcc/ChangeLog:

            * tree-vect-loop.cc (vect_analyze_loop_2): Add new parameter
            slp_done_for_suggested_uf and adjust with it accordingly.
            (vect_analyze_loop_1): Add new variable slp_done_for_suggested_uf,
            pass it down to vect_analyze_loop_2 for the initial analysis and
            applying suggested unroll factor.
            (vect_is_simple_reduction): Add parameter slp and adjust with it.
            (vect_analyze_scalar_cycles_1): Add parameter slp and pass down.
            (vect_analyze_scalar_cycles): Likewise.

  parent reply	other threads:[~2022-06-20 12:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13  5:59 [Bug tree-optimization/105940] New: " linkw at gcc dot gnu.org
2022-06-13  6:07 ` [Bug tree-optimization/105940] " linkw at gcc dot gnu.org
2022-06-13  6:08 ` linkw at gcc dot gnu.org
2022-06-13  8:25 ` rguenth at gcc dot gnu.org
2022-06-14  5:58 ` cvs-commit at gcc dot gnu.org
2022-06-14  8:46 ` linkw at gcc dot gnu.org
2022-06-15 10:13 ` cvs-commit at gcc dot gnu.org
2022-06-16 13:33 ` linkw at gcc dot gnu.org
2022-06-16 13:35 ` linkw at gcc dot gnu.org
2022-06-17 10:56 ` linkw at gcc dot gnu.org
2022-06-20 12:45 ` cvs-commit at gcc dot gnu.org [this message]
2022-06-23  1:59 ` cvs-commit at gcc dot gnu.org
2022-06-23  2:25 ` cvs-commit at gcc dot gnu.org
2022-06-23  3:20 ` linkw at gcc dot gnu.org
2022-06-23  6:28 ` rguenther at suse dot de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-105940-4-RuYiRHdsSG@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).