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] expmed.c: Improve multiplication by -3, -7, -15, -31, etc.


kazu@codesourcery.com (Kazu Hirata) writes:

> 2009-04-13  Kazu Hirata  <kazu@codesourcery.com>
>
> 	* expmed.c (shiftsub_cost): Rename to shiftsub0_cost.
> 	(shiftsub1_cost): New.
> 	(init_expmed): Compute shiftsub1_cost.
> 	(synth_mult): Optimize multiplications by constants of the form
> 	-(2^^m-1) for some constant positive integer m.

This is OK.

Please consider adding some target specific tests to ensure that these
optimizations are performed.

Thanks.

Ian


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