public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/110649] [14 Regression] 25% sphinx3 spec2006 regression on Ice Lake and zen between g:acaa441a98bebc52 (2023-07-06 11:36) and g:55900189ab517906 (2023-07-07 00:23)
Date: Sun, 16 Jul 2023 20:06:34 +0000	[thread overview]
Message-ID: <bug-110649-4-xRenkygo90@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110649-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I found the problem why vectorizer gets vectorized epilogue profile scales
wrong. It is scale_profile_for_vect_loop that uses niter_for_unrolled_loop
which does not understand the fact that if iteration count is not divisible,
the epilogue (unless loop is masked) will use the count.

THe upper bound compuation is actually right in update of loop_info, so we can
just use it directly instead of relying on niter_for_unrolled_loop.

Wrong profile in:

;;   basic block 14, loop depth 2, count 13764235 (guessed, freq 1.9247), maybe
hot
;;   Invalid sum of incoming counts 25234431 (guessed, freq 3.5286), should be
13764235 (guessed, freq 1.9247)

Is caused by loop peeling.  The unrolled loop is peeled 4 times which seems
like a reasonable idea, but I am not sure why profile is not updated correctly
here.

  parent reply	other threads:[~2023-07-16 20:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 22:35 [Bug target/110649] New: " hubicka at gcc dot gnu.org
2023-07-12 22:39 ` [Bug target/110649] " pinskia at gcc dot gnu.org
2023-07-12 22:39 ` [Bug target/110649] [14 Regression] " pinskia at gcc dot gnu.org
2023-07-14  7:16 ` hliu at amperecomputing dot com
2023-07-14 14:39 ` hubicka at gcc dot gnu.org
2023-07-14 14:41 ` hubicka at gcc dot gnu.org
2023-07-16 16:25 ` hubicka at gcc dot gnu.org
2023-07-16 17:39 ` hubicka at gcc dot gnu.org
2023-07-16 20:06 ` hubicka at gcc dot gnu.org [this message]
2023-07-16 20:14 ` hubicka at gcc dot gnu.org
2023-07-16 21:54 ` cvs-commit at gcc dot gnu.org
2023-07-16 21:55 ` cvs-commit at gcc dot gnu.org
2023-07-16 21:57 ` cvs-commit at gcc dot gnu.org
2023-07-17 10:48 ` roger at nextmovesoftware dot com
2023-07-17 11:53 ` jamborm at gcc dot gnu.org
2023-07-18 14:49 ` hubicka at gcc dot gnu.org
2023-07-18 15:56 ` [Bug target/110649] [14 Regression] 25% sphinx3 spec2006 regression on Ice Lake and zen since g:r14-2369-g3a61ca1b925653 (2023-07-06) hubicka at gcc dot gnu.org
2024-03-07 23:29 ` law at gcc dot gnu.org
2024-05-07  7:41 ` [Bug target/110649] [14/15 " rguenth 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-110649-4-xRenkygo90@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).