On 20 April 2015 at 17:35, Kyrill Tkachov <kyrylo.tkac...@arm.com> wrote: > Hi all, > > The aarch64_rtx_mult_cost helper is supposed to handle multiplication costs > as well as > PLUS/MINUS operations combined with multiplication or shift operations. The > shift > operations may contain an extension. Currently we do not handle all these > cases properly. > We also don't handle other supported shift types besides ASHIFT. > > This patch addresses that by beefing up aarch64_rtx_mult_cost to handle > extensions inside the shifts and handling the other kinds of supported > shifts. > > Bootstrapped and tested on aarch64-linux. > > Ok for trunk? > > Thanks, > Kyrill > > 2015-04-20 Kyrylo Tkachov <kyrylo.tkac...@arm.com> > > * config/aarch64/aarch64.c (aarch64_shift_p): New function. > (aarch64_rtx_mult_cost): Update comment to reflect that it also handles > combined arithmetic-shift ops. Properly handle all shift and extend > operations that can occur in combination with PLUS/MINUS. > Rename maybe_fma to compound_p. > (aarch64_rtx_costs): Use aarch64_shift_p when costing compound > arithmetic and shift operations.
+/* Return true iff CODE is a shift supported in combination + with arithmetic instructions. */ +static bool +aarch64_shift_p (enum rtx_code code) OK, but add the blank line between the function comment and the function please. /Marcus