This is the mail archive of the gcc-patches@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]

Re: [patch] h8300: Improve loads of certain constants.


On Wed, 25 Jun 2003, Kazu Hirata wrote:

> Hi,
> 
> Attached is a patch to improve loads of certain constants.
> 
> On H8/300, if one wants to load a constant whose upper and lower part
> are the same like 0x12341234, then gcc generates
> 
> 	mov.w	#4660,r0
> 	mov.w	#4660,r1
> 
> This can be improved as
> 
> 	mov.w	#4660,r0
> 	mov.w	r0,r1


Is this done post-reload?        

We should give CSE/GCSE a chance to optimize redundant constants before   
optimizing the constant loads into registers.

Toshi



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