public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/3978: arm peephole for loading two consecutive memory locations generates suboptimal code (on arm7tdmi)
@ 2001-08-09 14:16 Philip Blundell
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Blundell @ 2001-08-09 14:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR optimization/3978; it has been noted by GNATS.

From: Philip Blundell <philb@gnu.org>
To: segher@chello.nl
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/3978: arm peephole for loading two consecutive memory locations generates suboptimal code (on arm7tdmi) 
Date: Thu, 09 Aug 2001 22:12:51 +0100

 --==_Exmh_1440650826P
 Content-Type: text/plain; charset=us-ascii
 
 >I often see generated code like
 >
 >add   temp, pointer, #offset
 >ldmia temp, {regA, regB}
 >
 >(after which temp is dead)
 >
 >which is slower than just
 >
 >ldr regA, [pointer, #offset]
 >ldr regB, [pointer, #offset+4]
 >
 >and wastes a register as well
 
 Use -mtune=arm8 or some such.  I don't think this will do any harm on 
 ARM7TDMI and it should yield the results you are looking for.
 
 p.
 
 
 
 --==_Exmh_1440650826P
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.5 (GNU/Linux)
 Comment: Exmh version 2.1.1 10/15/1999 (debian)
 
 iD8DBQE7cvzTVTLPJe9CT30RAkM1AJ0ZhpF2M8JCTi2LWuXcxRJ9D2HKmQCghihx
 QyTShLjRcSJfxMRbeM42hwU=
 =gy55
 -----END PGP SIGNATURE-----
 
 --==_Exmh_1440650826P--


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

* Re: optimization/3978: arm peephole for loading two consecutive memory locations generates suboptimal code (on arm7tdmi)
@ 2001-08-10  3:26 rearnsha
  0 siblings, 0 replies; 3+ messages in thread
From: rearnsha @ 2001-08-10  3:26 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, segher

Synopsis: arm peephole for loading two consecutive memory locations generates suboptimal code (on arm7tdmi)

State-Changed-From-To: open->closed
State-Changed-By: rearnsha
State-Changed-When: Fri Aug 10 03:26:43 2001
State-Changed-Why:
    Duplicate of 3977

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3978&database=gcc


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

* optimization/3978: arm peephole for loading two consecutive memory locations generates suboptimal code (on arm7tdmi)
@ 2001-08-09 12:56 segher
  0 siblings, 0 replies; 3+ messages in thread
From: segher @ 2001-08-09 12:56 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3978
>Category:       optimization
>Synopsis:       arm peephole for loading two consecutive memory locations generates suboptimal code (on arm7tdmi)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          pessimizes-code
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 09 12:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     segher@chello.nl
>Release:        3.0
>Organization:
>Environment:

>Description:
I often see generated code like

add   temp, pointer, #offset
ldmia temp, {regA, regB}

(after which temp is dead)

which is slower than just

ldr regA, [pointer, #offset]
ldr regB, [pointer, #offset+4]

and wastes a register as well
>How-To-Repeat:
a lot of code will do this
>Fix:
change the peephole, i think
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2001-08-10  3:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-09 14:16 optimization/3978: arm peephole for loading two consecutive memory locations generates suboptimal code (on arm7tdmi) Philip Blundell
  -- strict thread matches above, loose matches on Subject: below --
2001-08-10  3:26 rearnsha
2001-08-09 12:56 segher

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