This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] expmed.c: Improve multiplication by -3, -7, -15, -31, etc.
- From: Ian Lance Taylor <iant at google dot com>
- To: kazu at codesourcery dot com (Kazu Hirata)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 02 May 2009 16:59:58 -0700
- Subject: Re: [patch] expmed.c: Improve multiplication by -3, -7, -15, -31, etc.
- References: <20090413172513.C6B356F62057@daisy.codesourcery.com>
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