optimization/3978: arm peephole for loading two consecutive memory locations generates suboptimal code (on arm7tdmi)
Philip Blundell
philb@gnu.org
Thu Aug 9 14:16:00 GMT 2001
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--
More information about the Gcc-prs
mailing list