]> git.ipfire.org Git - thirdparty/gcc.git/commit
AArch64: Do not increase the vect reduction latency by multiplying count [PR110625]
authorHao Liu <hliu@os.amperecomputing.com>
Mon, 31 Jul 2023 12:53:37 +0000 (20:53 +0800)
committerHao Liu <hliu@os.amperecomputing.com>
Mon, 31 Jul 2023 12:55:14 +0000 (20:55 +0800)
commitbf67bf4880ce5be0b6e48c7c35828528b7be12ed
treece2523654309d3278a3a4144bf6d1e2cebaaa185
parent05986af232bca2f0a9219f8bd420a1d1f9068aa8
AArch64: Do not increase the vect reduction latency by multiplying count [PR110625]

The new costs should only count reduction latency by multiplying count for
single_defuse_cycle.  For other situations, this will increase the reduction
latency a lot and miss vectorization opportunities.

Tested on aarch64-linux-gnu.

gcc/ChangeLog:

PR target/110625
* config/aarch64/aarch64.cc (count_ops): Only '* count' for
single_defuse_cycle while counting reduction_latency.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/pr110625_1.c: New testcase.
* gcc.target/aarch64/pr110625_2.c: New testcase.
gcc/config/aarch64/aarch64.cc
gcc/testsuite/gcc.target/aarch64/pr110625_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/pr110625_2.c [new file with mode: 0644]