This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] h8300: Improve loads of certain constants.
- From: <tm_gccmail at mail dot kloo dot net>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 25 Jun 2003 11:24:08 -0700 (PDT)
- Subject: 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