Bug 110727 - [14 Regression] gcc.target/aarch64/sve/aarch64-sve.exp has two new failures since commit 061f74c0673
Summary: [14 Regression] gcc.target/aarch64/sve/aarch64-sve.exp has two new failures s...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 14.0
: P3 normal
Target Milestone: 14.0
Assignee: Not yet assigned to anyone
URL:
Keywords: testsuite-fail
Depends on:
Blocks:
 
Reported: 2023-07-18 19:24 UTC by Thiago Jung Bauermann
Modified: 2023-08-06 20:49 UTC (History)
1 user (show)

See Also:
Host:
Target: aarch64
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Tarball containing testsuite log files for first bad and last good commits. (182.43 KB, application/gzip)
2023-07-18 19:24 UTC, Thiago Jung Bauermann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Jung Bauermann 2023-07-18 19:24:51 UTC
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.
Comment 1 GCC Commits 2023-07-21 17:38:49 UTC
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.
Comment 2 Thiago Jung Bauermann 2023-07-21 22:46:50 UTC
Thanks! I confirmed that I can't reproduce the problem anymore in trunk.
Comment 3 Jan Hubicka 2023-08-06 20:49:45 UTC
Fixed.