From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philip Blundell To: nobody@gcc.gnu.org Cc: gcc-prs@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 14:16:00 -0000 Message-id: <20010809211602.10052.qmail@sourceware.cygnus.com> X-SW-Source: 2001-08/msg00146.html List-Id: The following reply was made to PR optimization/3978; it has been noted by GNATS. From: Philip Blundell 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--