diff options
author | Jonathan Wright <jonathan.wright@arm.com> | 2021-07-28 17:45:36 +0100 |
---|---|---|
committer | Jonathan Wright <jonathan.wright@arm.com> | 2021-08-05 11:52:13 +0100 |
commit | 0c3aab7f2a394b69a0cfd4852e33f11d9eb7e737 (patch) | |
tree | 14bc4fe5016ee5661f51deac402500bf5fc94b53 /gcc/tree-vectorizer.h | |
parent | 8cd27a3b25558e5be7f8595fc1c828bc46641671 (diff) | |
download | gcc-0c3aab7f2a394b69a0cfd4852e33f11d9eb7e737.zip gcc-0c3aab7f2a394b69a0cfd4852e33f11d9eb7e737.tar.gz gcc-0c3aab7f2a394b69a0cfd4852e33f11d9eb7e737.tar.bz2 |
aarch64: Don't include vec_select high-half in SIMD subtract cost
The Neon subtract-long/subract-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 subtract 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 subtract
cost.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/vsubX_high_cost.c: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions