Created attachment 55574 [details] Tarball containing testsuite log files for first bad and last good commits. Our CI detected that commit 061f74c06735 "Fix profile update in scale_profile_for_vect_loop" introduced these testsuite failures on aarch64-linux: Running gcc:gcc.target/aarch64/sve/aarch64-sve.exp ... FAIL: gcc.target/aarch64/sve/live_1.c scan-assembler-times \\twhilelo\\tp[0-7].b, 2 FAIL: gcc.target/aarch64/sve/live_1.c scan-assembler-times \\twhilelo\\tp[0-7].h, 4 I confirmed that they are still present in trunk as of commit c11a3aedec26 "tree-ssa-loop-ch improvements, part 3" from today. Tested on Ubuntu 22.04 with: $ ~/src/gcc/configure --disable-bootstrap --disable-multilib && make -j 60 $ make -C gcc check-c RUNTESTFLAGS=gcc.target/aarch64/sve/aarch64-sve.exp I'll attach gcc.sum and gcc.log from commit c11a3aedec26 as well as gcc.sum and gcc.log from its parent, which was the last commit where the test passed.
The master branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>: https://gcc.gnu.org/g:a31ef26b056d0c4f0a9f08b6eb81456ea257298e commit r14-2716-ga31ef26b056d0c4f0a9f08b6eb81456ea257298e Author: Jan Hubicka <jh@suse.cz> Date: Fri Jul 21 19:38:26 2023 +0200 Avoid scaling flat loop profiles of vectorized loops As discussed, when vectorizing loop with static profile, it is not always good idea to divide the header frequency by vectorization factor because the profile may not realistically represent the expected number of iterations. Since in such cases we default to relatively low iteration counts (based on average for spec2k17), this will make vectorized loop body look cold. This patch makes vectorizer to look for flat profiles and only possibly reduce the profile by known upper bound on iteration counts. gcc/ChangeLog: PR target/110727 * tree-vect-loop.cc (scale_profile_for_vect_loop): Avoid scaling flat profiles by vectorization factor. (vect_transform_loop): Check for flat profiles.
Thanks! I confirmed that I can't reproduce the problem anymore in trunk.
Fixed.