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] Fix shift-and-add costs in rs6000_rtx_costs


>>>>> 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


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