This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/36134] GCC creates suboptimal ASM : usage of ADDA.L where LEA could be used



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]