aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorJonathan Wright <jonathan.wright@arm.com>2021-07-19 14:01:52 +0100
committerJonathan Wright <jonathan.wright@arm.com>2021-08-04 16:57:38 +0100
commit1d65c9d25199264bc8909018df1b0dca71c0b32d (patch)
tree72de3f5f492a0ae906d20706ccfe02e3e7131c83 /libgcc
parent5a1017dc305c49c59129d45536630d02dbc01c45 (diff)
downloadgcc-1d65c9d25199264bc8909018df1b0dca71c0b32d.zip
gcc-1d65c9d25199264bc8909018df1b0dca71c0b32d.tar.gz
gcc-1d65c9d25199264bc8909018df1b0dca71c0b32d.tar.bz2
aarch64: Don't include vec_select element in SIMD multiply cost
The Neon multiply/multiply-accumulate/multiply-subtract instructions can take various forms - multiplying full vector registers of values or multiplying one vector by a single element of another. Regardless of the form used, these instructions have the same cost, and this should be reflected by the RTL cost function. This patch adds RTL tree traversal in the Neon multiply cost function to match the vec_select used by the lane-referencing forms of the instructions already mentioned. This traversal prevents the cost of the vec_select from being added into the cost of the multiply - meaning that these instructions can now be emitted in the combine pass as they are no longer deemed prohibitively expensive. gcc/ChangeLog: 2021-07-19 Jonathan Wright <jonathan.wright@arm.com> * config/aarch64/aarch64.c (aarch64_strip_duplicate_vec_elt): Define. (aarch64_rtx_mult_cost): Traverse RTL tree to prevent vec_select cost from being added into Neon multiply cost. gcc/testsuite/ChangeLog: * gcc.target/aarch64/vmul_element_cost.c: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions