public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/60749] New: combine is overly cautious when operating on volatile memory references
@ 2014-04-03 15:41 amylaar at gcc dot gnu.org
  2022-02-04 20:55 ` [Bug rtl-optimization/60749] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: amylaar at gcc dot gnu.org @ 2014-04-03 15:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60749

            Bug ID: 60749
           Summary: combine is overly cautious when operating on volatile
                    memory references
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amylaar at gcc dot gnu.org
            Blocks: 53938

Curtesy of volatile_ok / init_recog_no_volatile, combine will
reject any combination that involves a volatile memref in the combined
pattern.

In particular, if any narrow memory location is read on a
WORD_REGISTER_OPERATIONS target, the zero/sign extension can't be combined
with a memory read, even if a suitably extending memory load instruction is
available - unless that pattern gets specifically written to accept
volatile memrefs, shunning the standard memory_operand and
general_operand predicates.

combine already needs to do special checks to make sure it doesn't
slip up when handling such patterns (E.g. see PR51374), so what good
does init_recog_non_volatile do combine these days?

At the very least, I think we should allow combinations involving a single
memref with unchanged mode before and after combination - that woud cover
the zero and sign extending loads.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/60749] combine is overly cautious when operating on volatile memory references
  2014-04-03 15:41 [Bug rtl-optimization/60749] New: combine is overly cautious when operating on volatile memory references amylaar at gcc dot gnu.org
@ 2022-02-04 20:55 ` pinskia at gcc dot gnu.org
  2023-05-26 13:56 ` lis8215 at gmail dot com
  2023-09-25  7:09 ` cptarse-luke at yahoo dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-04 20:55 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-02-04
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/60749] combine is overly cautious when operating on volatile memory references
  2014-04-03 15:41 [Bug rtl-optimization/60749] New: combine is overly cautious when operating on volatile memory references amylaar at gcc dot gnu.org
  2022-02-04 20:55 ` [Bug rtl-optimization/60749] " pinskia at gcc dot gnu.org
@ 2023-05-26 13:56 ` lis8215 at gmail dot com
  2023-09-25  7:09 ` cptarse-luke at yahoo dot com
  2 siblings, 0 replies; 4+ messages in thread
From: lis8215 at gmail dot com @ 2023-05-26 13:56 UTC (permalink / raw)
  To: gcc-bugs

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

Siarhei Volkau <lis8215 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lis8215 at gmail dot com

--- Comment #2 from Siarhei Volkau <lis8215 at gmail dot com> ---
Created attachment 55167
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55167&action=edit
allow combine ld/st of volatile mem with any_extend op

Is anyone bothering on that? I'm, as embedded engineer, sadly looking on that
long standing issue.

I can propose a quick patch which enables combining volatile mem ld/st with
any_extend for most cases. And it seems, like platform specific test results
remain the same with it (arm/aarch64/mips were tested).

Post it in hope it can help for anyone who needs it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/60749] combine is overly cautious when operating on volatile memory references
  2014-04-03 15:41 [Bug rtl-optimization/60749] New: combine is overly cautious when operating on volatile memory references amylaar at gcc dot gnu.org
  2022-02-04 20:55 ` [Bug rtl-optimization/60749] " pinskia at gcc dot gnu.org
  2023-05-26 13:56 ` lis8215 at gmail dot com
@ 2023-09-25  7:09 ` cptarse-luke at yahoo dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cptarse-luke at yahoo dot com @ 2023-09-25  7:09 UTC (permalink / raw)
  To: gcc-bugs

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

Luke <cptarse-luke at yahoo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cptarse-luke at yahoo dot com

--- Comment #3 from Luke <cptarse-luke at yahoo dot com> ---
*** Bug 111581 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-25  7:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-03 15:41 [Bug rtl-optimization/60749] New: combine is overly cautious when operating on volatile memory references amylaar at gcc dot gnu.org
2022-02-04 20:55 ` [Bug rtl-optimization/60749] " pinskia at gcc dot gnu.org
2023-05-26 13:56 ` lis8215 at gmail dot com
2023-09-25  7:09 ` cptarse-luke at yahoo dot com

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).