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 middle-end/110148] [14 Regression] TSVC s242 regression between g:c0df96b3cda5738afbba3a65bb054183c5cd5530 and g:e4c986fde56a6248f8fbe6cf0704e1da34b055d8
Date: Thu, 29 Jun 2023 09:31:25 +0000	[thread overview]
Message-ID: <bug-110148-4-IxEsf0WbmO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110148-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Lili Cui <cuilili@gcc.gnu.org>:

https://gcc.gnu.org/g:4633e38cd22c5e51fac984124c7627be912d0999

commit r14-2185-g4633e38cd22c5e51fac984124c7627be912d0999
Author: Lili Cui <lili.cui@intel.com>
Date:   Thu Jun 29 06:51:56 2023 +0000

    Avoid adding loop-carried ops to long chains

    Avoid adding loop-carried ops to long chains, otherwise the whole chain
will
    have dependencies across the loop iteration. Just keep loop-carried ops in
a
    separate chain.
       E.g.
       x_1 = phi(x_0, x_2)
       y_1 = phi(y_0, y_2)

       a + b + c + d + e + x1 + y1

       SSA1 = a + b;
       SSA2 = c + d;
       SSA3 = SSA1 + e;
       SSA4 = SSA3 + SSA2;
       SSA5 = x1 + y1;
       SSA6 = SSA4 + SSA5;

    With the patch applied, these test cases improved by 32%~100%.

    S242:
    for (int i = 1; i < LEN_1D; ++i) {
        a[i] = a[i - 1] + s1 + s2 + b[i] + c[i] + d[i];}

    Case 1:
    for (int i = 1; i < LEN_1D; ++i) {
        a[i] = a[i - 1] + s1 + s2 + b[i] + c[i] + d[i] + e[i];}

    Case 2:
    for (int i = 1; i < LEN_1D; ++i) {
        a[i] = a[i - 1] + b[i - 1] + s1 + s2 + b[i] + c[i] + d[i] + e[i];}

    The value is the execution time
    A: original version
    B: with FMA patch g:e5405f065bace0685cb3b8878d1dfc7a6e7ef409(base on A)
    C: with current patch(base on B)

              A       B       C     B/A             C/A
    s242    2.859   5.152   2.859   1.802028681     1
    case 1  5.489   5.488   3.511   0.999818        0.64
    case 2  7.216   7.499   4.885   1.039218        0.68

    gcc/ChangeLog:

            PR tree-optimization/110148
            * tree-ssa-reassoc.cc (rewrite_expr_tree_parallel): Handle
loop-carried
            ops in this function.

  parent reply	other threads:[~2023-06-29  9:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06 20:33 [Bug middle-end/110148] New: " hubicka at gcc dot gnu.org
2023-06-06 21:02 ` [Bug middle-end/110148] " pinskia at gcc dot gnu.org
2023-06-09  6:36 ` [Bug middle-end/110148] [14 Regression] " rguenth at gcc dot gnu.org
2023-06-09 11:11 ` lili.cui at intel dot com
2023-06-25  5:56 ` lili.cui at intel dot com
2023-06-25 20:01 ` hubicka at gcc dot gnu.org
2023-06-29  9:31 ` cvs-commit at gcc dot gnu.org [this message]
2023-09-23 10:32 ` jamborm at gcc dot gnu.org
2023-09-26  1:55 ` lili.cui at intel dot com
2023-09-26 15:04 ` jamborm at gcc dot gnu.org

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-110148-4-IxEsf0WbmO@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).