This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/36134] GCC creates suboptimal ASM : usage of ADDA.L where LEA could be used
- From: "gunnar at greyhound-data dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 May 2008 12:50:42 -0000
- Subject: [Bug target/36134] GCC creates suboptimal ASM : usage of ADDA.L where LEA could be used
- References: <bug-36134-16150@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from gunnar at greyhound-data dot com 2008-05-29 12:50 -------
Created an attachment (id=15699)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15699&action=view)
Prefer 4 byte long LEA over 6 byte long ADD.L
Please include the attached patch for GCC.
The added patch has changed the case statement to prefer the 4 byte long lea
over the 6 byte long add.l for immediate sub/add instructions to address
registers with an immediate operant size of 16bit max.
LEA is optimized for pipelining (with destination forwarding) and is shorter
than ADD.L
Regards
Gunnar von Boehn
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36134