This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] H8300 Shift Optimization - comments
- From: tm <tm at mail dot kloo dot net>
- To: "Dhananjay R. Deshpande" <dhananjayd at kpit dot com>
- Cc: Anita Kulkarni <AnitaK at kpit dot com>, kazu at cs dot umass dot edu,shumpei dot kawasaki at hsa dot hitachi dot com, gcc-patches at gcc dot gnu dot org
- Date: Tue, 6 Aug 2002 15:18:58 -0700 (PDT)
- Subject: RE: [PATCH] H8300 Shift Optimization - comments
On Tue, 6 Aug 2002, Dhananjay R. Deshpande wrote:
> Hi,
>
> > -----Original Message-----
> > From: tm [mailto:tm@mail.kloo.net]
> > Sent: Thursday, August 01, 2002 1:49 AM
> > To: Dhananjay R. Deshpande
> > Cc: Anita Kulkarni; kazu@cs.umass.edu;
> > shumpei.kawasaki@hsa.hitachi.com;
> > gcc-patches@gcc.gnu.org
> > Subject: [PATCH] H8300 Shift Optimization - comments
> >
> >
> >
> > It would be a good idea to update RTX_COSTS also to reflect the shift
> > optimizations so the compiler can evaluate the cost of operations
> > properly.
> >
> In h8300.h, RTX_COST for HImode shifts is being returned as 2 for all shift counts. Couldn't understand why it is 2 for all shift counts when it will be much higher for high shift counts.
Yep. It's horribly broken, which is why I suggested the changes.
I suspect GCC is currently making bad choices regarding shift and
multiplies for the H8 because the RTX_COST is so broken...
>
> Regards,
> Dhananjay
> >
> > Toshi
Toshi