public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/65326] New: LRA missing a Thumb optimization.
@ 2015-03-05 17:34 matthew.wahab at arm dot com
  2015-05-07 11:20 ` [Bug target/65326] " renlin at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: matthew.wahab at arm dot com @ 2015-03-05 17:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65326
           Summary: LRA missing a Thumb optimization.
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: matthew.wahab at arm dot com

Created attachment 34964
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34964&action=edit
Testcase showing change in behaviour.

The ARM backend no longer supports -mno-lra so only the LRA is available. This
has also removed the Thumb mode optimiziation introduced in
https://gcc.gnu.org/ml/gcc-patches/2005-08/msg01140.html to fix PR 23436.

This turns sequences like
     mov    r3, r9
    mov    r2, r10
    ldr    r0, [r3, r2]
into
    mov    r3, r9
    add    r3, r3, r10
    ldr    r0, [r3]
which saves a register.

Attached is a contrived test case. Compiling with gcc-4.9 with -mthumb -mno-lra 
(at -O1 and higher) produces the second (better) sequence. Compiling with
gcc-4.9 or gcc-trunk with -mthumb (at -O1 and higher) produces the first
sequence. The sequences appear after the 'nop'

gcc-4.9 is 
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20141119
(release) [ARM/embedded-4_9-branch revision 218278]

trunk is:
arm-none-eabi-gcc (unknown) 5.0.0 20150217 (experimental)


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

end of thread, other threads:[~2015-05-07 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-05 17:34 [Bug target/65326] New: LRA missing a Thumb optimization matthew.wahab at arm dot com
2015-05-07 11:20 ` [Bug target/65326] " renlin 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).