aarch64: fix vector multiplication costs
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Tue, 9 Feb 2021 18:09:19 +0000 (18:09 +0000)
committerAndre Vieira <andre.simoesdiasvieira@arm.com>
Tue, 9 Feb 2021 18:24:22 +0000 (18:24 +0000)
commita11ef53238c8ebaab9a3fbf200cb8b5c997b473b
treee393fec2a59117a3b3c43f37c9b50275ab865b1d
parent73e52926b6c5f02fb3f34706b4afb2d8bcd86638
aarch64: fix vector multiplication costs

This patch introduces a vect.mul RTX cost and decouples the vector
multiplication costing from the scalar one.

gcc/ChangeLog:
2021-02-09  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* config/aarch64/aarch64-cost-tables.h: Add entries for vect.mul.
* config/aarch64/aarch64.c (aarch64_rtx_mult_cost): Use vect.mul for
vector multiplies and vect.alu for SSRA.
* config/arm/aarch-common-protos.h (struct vector_cost_table): Define
vect.mul cost field.
* config/arm/aarch-cost-tables.h: Add entries for vect.mul.
* config/arm/arm.c: Likewise.

gcc/testsuite/ChangeLog:
2021-02-09  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* gcc.target/aarch64/asimd-mul-to-shl-sub.c: New test.
gcc/config/aarch64/aarch64-cost-tables.h
gcc/config/aarch64/aarch64.c
gcc/config/arm/aarch-common-protos.h
gcc/config/arm/aarch-cost-tables.h
gcc/config/arm/arm.c
gcc/testsuite/gcc.target/aarch64/asimd-mul-to-shl-sub.c [new file with mode: 0644]