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 ipa/113478] -Os does not inline single instruction function
Date: Fri, 19 Jan 2024 11:09:04 +0000	[thread overview]
Message-ID: <bug-113478-4-SPLYYUUkN6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113478-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #2)
> Probably is_inexpensive_bulitin_p should return true here?

Possibly, at least when we know it doesn't expand to a libatomic call?  OTOH
even then a function just wrapping such call should probably be inlined,
so the question is whether the problem that

  _3 = &MEM[(const struct __atomic_base *)this_1(D)]._M_i;
                freq:1.00 size:  0 time:  0
  _4 = __atomic_load_1 (_3, 0);
                freq:1.00 size:  4 time: 13
  _5 = (char) _4;
                freq:1.00 size:  0 time:  0
  return _5;
                freq:1.00 size:  1 time:  2

is estimated as too big compared to the call calling the function
(OTOH a1.test () has no arguments while __atomic_load_1 has two).

  parent reply	other threads:[~2024-01-19 11:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18 12:56 [Bug c++/113478] New: " jari.helaakoski at qt dot io
2024-01-18 13:12 ` [Bug ipa/113478] " rguenth at gcc dot gnu.org
2024-01-19 10:51 ` hubicka at ucw dot cz
2024-01-19 11:09 ` rguenth at gcc dot gnu.org [this message]
2024-01-19 16:43 ` hubicka at ucw dot cz

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-113478-4-SPLYYUUkN6@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).