]> gcc.gnu.org Git - gcc.git/commit
aarch64: Don't include vec_select high-half in SIMD add cost
authorJonathan Wright <jonathan.wright@arm.com>
Wed, 28 Jul 2021 14:49:29 +0000 (15:49 +0100)
committerJonathan Wright <jonathan.wright@arm.com>
Thu, 5 Aug 2021 10:51:57 +0000 (11:51 +0100)
commit8cd27a3b25558e5be7f8595fc1c828bc46641671
treec2ddc5279c9a722aeb25919b692faa271ed79617
parentf0fc1e66238e2e9fe0cbc6e5b77fd163bf887b2c
aarch64: Don't include vec_select high-half in SIMD add cost

The Neon add-long/add-widen instructions can select the top or bottom
half of the operand registers. This selection does not change the
cost of the underlying instruction and this should be reflected by
the RTL cost function.

This patch adds RTL tree traversal in the Neon add cost function to
match vec_select high-half of its operands. This traversal prevents
the cost of the vec_select from being added into the cost of the
subtract - meaning that these instructions can now be emitted in the
combine pass as they are no longer deemed prohibitively expensive.

gcc/ChangeLog:

2021-07-28  Jonathan Wright  <jonathan.wright@arm.com>

* config/aarch64/aarch64.c: Traverse RTL tree to prevent cost
of vec_select high-half from being added into Neon add cost.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/vaddX_high_cost.c: New test.
gcc/config/aarch64/aarch64.c
gcc/testsuite/gcc.target/aarch64/vaddX_high_cost.c [new file with mode: 0644]
This page took 0.053198 seconds and 5 git commands to generate.