public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/115505] New: missing optimization: thumb1 use ldmia/stmia for load store DI/DF data when possible
@ 2024-06-15 13:51 lis8215 at gmail dot com
  2024-06-15 15:10 ` [Bug rtl-optimization/115505] " pinskia at gcc dot gnu.org
  2024-06-15 20:35 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: lis8215 at gmail dot com @ 2024-06-15 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115505
           Summary: missing optimization: thumb1 use ldmia/stmia for load
                    store DI/DF data when possible
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lis8215 at gmail dot com
  Target Milestone: ---

Created attachment 58438
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58438&action=edit
possible solution patch

At the moment GCC emits two ldr/str instructions for DI/DF modes load/store.
However there's a trick to use ldmia/stmia when address register in not
used anymore/dead or reused.

I don't know if it affects arm and/or thumb2 as well.
Patch for possible solution for thumb1 provided.

Comparing code size with the patch gives for v6-m/nofp:
       libgcc:  -52 bytes / -0.10%
Newlib's libc:  -68 bytes / -0.03%
         libm:  -96 bytes / -0.10%
    libstdc++: -140 bytes / -0.02%

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

* [Bug rtl-optimization/115505] missing optimization: thumb1 use ldmia/stmia for load store DI/DF data when possible
  2024-06-15 13:51 [Bug rtl-optimization/115505] New: missing optimization: thumb1 use ldmia/stmia for load store DI/DF data when possible lis8215 at gmail dot com
@ 2024-06-15 15:10 ` pinskia at gcc dot gnu.org
  2024-06-15 20:35 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-15 15:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note patches should be posted to gcc-patches@ after reading
https://gcc.gnu.org/contribute.html .

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

* [Bug rtl-optimization/115505] missing optimization: thumb1 use ldmia/stmia for load store DI/DF data when possible
  2024-06-15 13:51 [Bug rtl-optimization/115505] New: missing optimization: thumb1 use ldmia/stmia for load store DI/DF data when possible lis8215 at gmail dot com
  2024-06-15 15:10 ` [Bug rtl-optimization/115505] " pinskia at gcc dot gnu.org
@ 2024-06-15 20:35 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-15 20:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

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

end of thread, other threads:[~2024-06-15 20:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-15 13:51 [Bug rtl-optimization/115505] New: missing optimization: thumb1 use ldmia/stmia for load store DI/DF data when possible lis8215 at gmail dot com
2024-06-15 15:10 ` [Bug rtl-optimization/115505] " pinskia at gcc dot gnu.org
2024-06-15 20:35 ` pinskia at gcc dot gnu.org

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