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 rtl-optimization/105661] Comparisons to atomic variables generates less efficient code
Date: Wed, 26 Oct 2022 23:35:14 +0000	[thread overview]
Message-ID: <bug-105661-4-iEq93ZGskC@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105661-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1) 
> Basically we don't optimize anything related to volatile memory even into
> the address part. This is basically PR 50677 really.

I should say internally for RTL level we do atomic loads as volatile memory.

(insn 5 4 0 (set (reg:QI 83 [ _5 ])
        (mem/v:QI (symbol_ref:DI ("atomic") [flags 0x2]  <var_decl
0x7fefa628cab0 atomic>) [-1  S1 A8]))
"/opt/compiler-explorer/gcc-trunk-20221026/include/c++/13.0.0/bits/atomic_base.h":505:24
-1
     (nil))

  parent reply	other threads:[~2022-10-26 23:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 12:59 [Bug target/105661] New: " redbeard0531 at gmail dot com
2022-10-26 23:34 ` [Bug rtl-optimization/105661] " pinskia at gcc dot gnu.org
2022-10-26 23:35 ` pinskia at gcc dot gnu.org [this message]
2023-02-09 18:11 ` 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-105661-4-iEq93ZGskC@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).