public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/101653] [9/10/11/12 Regression] Bad code generated when optimizing nested for loops
Date: Tue, 27 Jul 2021 23:09:33 +0000	[thread overview]
Message-ID: <bug-101653-4-HOEuJAzfdF@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101653-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed,
ivcannon is turning the loops into:
  <bb 2> [local count: 79093198]:
  goto <bb 6>; [100.00%]

  <bb 4> [local count: 357878150]:
  a_8 = a_11 + 1;
  c_14 = c_3 + 2;
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 79093198]:
  # _5 = PHI <123(6)>
  return _5;

  <bb 6> [local count: 375401868]:
  # c_3 = PHI <1(2), c_14(4)>
  # a_11 = PHI <0(2), a_8(4)>
  # ivtmp_20 = PHI <2(2), ivtmp_1(4)>
  c_6 = c_3 + 1;
  ivtmp_1 = ivtmp_20 - 1;
  if (ivtmp_1 == 0)
    goto <bb 5>; [5.50%]
  else
    goto <bb 4>; [94.50%]

Removing all of the if conditions on c < a and turning it into true ...

  parent reply	other threads:[~2021-07-27 23:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 22:48 [Bug c/101653] New: " phd at phd dot re
2021-07-27 22:55 ` [Bug tree-optimization/101653] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2021-07-27 23:01 ` jakub at gcc dot gnu.org
2021-07-27 23:09 ` pinskia at gcc dot gnu.org [this message]
2021-07-27 23:13 ` pinskia 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-101653-4-HOEuJAzfdF@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).