public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/106315] [13 Regression] 7.8% increased codesize on specfp 507.cactuBSSN_r
Date: Fri, 29 Jul 2022 14:48:37 +0000	[thread overview]
Message-ID: <bug-106315-4-NGg8ByDDie@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106315-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
Here is the testcase:
---
void
bar(int *indices, int max_iter, int *actual_indices,
    int *iters_per_dim, int N_dims)
{
  int iter = 0;
  int sum_indices = 0;
  int flag, k;
  while (iter < max_iter) {
    for (k = N_dims - 1; k > 0; k--) {
      sum_indices += actual_indices[k];
    }
    if (sum_indices >= max_iter) {
      return;
    }
    iter++;
    for (k = 0; k < N_dims; k++) {
      if (indices[k] < iters_per_dim[k] - 1) {
        indices[k]++;
        break;
      } 
    }
  }
}
---

The second loop is unrolled after the commit.

  parent reply	other threads:[~2022-07-29 14:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 14:55 [Bug tree-optimization/106315] New: " admin at levyhsu dot com
2022-07-18  7:34 ` [Bug tree-optimization/106315] [13 Regression] " rguenth at gcc dot gnu.org
2022-07-18  8:50 ` marxin at gcc dot gnu.org
2022-07-21  3:26 ` admin at levyhsu dot com
2022-07-21 15:28 ` hjl.tools at gmail dot com
2022-07-25  6:30 ` admin at levyhsu dot com
2022-07-29 14:48 ` hjl.tools at gmail dot com [this message]
2023-02-21 14:05 ` rguenth at gcc dot gnu.org
2023-04-26  6:56 ` [Bug tree-optimization/106315] [13/14 " rguenth at gcc dot gnu.org
2023-07-27  9:23 ` rguenth at gcc dot gnu.org
2024-03-09 17:16 ` law at gcc dot gnu.org
2024-05-21  9:11 ` [Bug tree-optimization/106315] [13/14/15 " jakub 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-106315-4-NGg8ByDDie@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).