[PATCH] H8300 Shift Optimization - comments

tm tm@mail.kloo.net
Tue Aug 6 15:26:00 GMT 2002


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




More information about the Gcc-patches mailing list