[PATCH][AArch64] Properly handle SHIFT ops and EXTEND in aarch64_rtx_mult_cost

Kyrill Tkachov kyrylo.tkachov@arm.com
Mon Apr 20 16:35:00 GMT 2015


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.tkachov@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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aarch64-costs-arith-mult-shift.patch
Type: text/x-patch
Size: 4165 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150420/d9c0b285/attachment.bin>


More information about the Gcc-patches mailing list