public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/99823] -funroll-all-loops bugs when using contexpr variable
Date: Tue, 30 Mar 2021 13:06:42 +0000	[thread overview]
Message-ID: <bug-99823-4-QOTsoHgiEB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99823-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-03-30
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
-funroll-all-loops applies to the RTL loop unroller, the GIMPLE level
concludes:

Estimating sizes for loop 1
 BB: 3, after_exit: 0
  size:   1 _1 = MEM[(int (*<T9564>) (int) &)__for_begin_21];
  size:   5 _13 = _1 (s_20);
  size:   1 __for_begin_14 = __for_begin_21 + 8;
  size:   1 ivtmp_4 = ivtmp_11 - 1;
   Induction variable computation will be folded away.
  size:   2 if (ivtmp_4 != 0)
   Exit condition will be eliminated in peeled copies.
   Exit condition will be eliminated in last copy.
   Constant conditional.
 BB: 5, after_exit: 1
size: 10-3, last_iteration: 10-3
  Loop size: 10
  Estimated size after unrolling: 14
Not unrolling loop 1: contains call and code would grow.

so it concludes unrolling isn't profitable (but it would turn indirect into
direct calls).

  reply	other threads:[~2021-03-30 13:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30  4:42 [Bug c++/99823] New: " ustcw0ng at mail dot ustc.edu.cn
2021-03-30 13:06 ` rguenth at gcc dot gnu.org [this message]
2021-03-31  2:56 ` [Bug tree-optimization/99823] " ustcw0ng at mail dot ustc.edu.cn

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-99823-4-QOTsoHgiEB@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).