This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix shift-and-add costs in rs6000_rtx_costs
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 11 Jul 2004 23:08:36 -0400
- Subject: Re: [PATCH] Fix shift-and-add costs in rs6000_rtx_costs
- References: <Pine.LNX.4.44.0407111938230.14701-100000@www.eyesopen.com>
>>>>> Roger Sayle writes:
> The following patch tweaks the rs6000's TARGET_RTX_COST function to
> indicate that it doesn't have shift-and-add or shift-and-sub insns.
> The middle-end's expmed_init calls rtx_cost on the RTL pattern
> (plus (mult (reg) (const_int)) (reg)), to determine whether the backend
> has shift-and-add or shift-and-sub instructions that can be used to
> efficiently implement synthetic multiply.
Is this change going to disable shift-and-add for all multiplies?
We do want to use shift-and-add where the cost for the two instructions is
less than the cost of a multiply.
David