https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110625
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Hao Liu <h...@gcc.gnu.org>: https://gcc.gnu.org/g:bf67bf4880ce5be0b6e48c7c35828528b7be12ed commit r14-2877-gbf67bf4880ce5be0b6e48c7c35828528b7be12ed Author: Hao Liu <h...@os.amperecomputing.com> Date: Mon Jul 31 20:53:37 2023 +0800 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.