From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 81A3B3858C35; Tue, 19 Mar 2024 15:47:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81A3B3858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710863269; bh=wSUzP7iPbAK7pg4BTDhOVgt/2pMHieBkWaCK7nFHVVE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=i1Zpz2AjAORYNYb2bIRO6DLxf2Nlb984nwhxTwJ+mDcyLt4h+rTJYtwUvjnEhZkYd 3BvWlgoNDljN7W06oioBH1Fu06iYQ+RpR63tiEp+Nlv2p6hqtKIe9M0nV4FU/1kJBx 2ePAWLYp89XCbHK/lAOr+GMF4Rw0ol0WUbTwAmUg= From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/109596] [14 Regression] Lots of guality testcase fails on x86_64 after r14-162-gcda246f8b421ba Date: Tue, 19 Mar 2024 15:47:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: testsuite-fail, wrong-debug X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109596 --- Comment #6 from Jan Hubicka --- On this testcase trunk does get same dump as gcc13 for pass just before ch2 with ch2 we get: @@ -192,9 +236,8 @@ # DEBUG BEGIN_STMT goto ; [100.00%] - [local count: 954449105]: + [local count: 954449104]: # j_15 =3D PHI - # DEBUG j =3D> j_15 # DEBUG BEGIN_STMT a[b_14][j_15] =3D 0; # DEBUG BEGIN_STMT @@ -203,29 +246,30 @@ # DEBUG j =3D> j_9 # DEBUG BEGIN_STMT if (j_9 <=3D 7) - goto ; [88.89%] + goto ; [87.50%] else - goto ; [11.11%] + goto ; [12.50%] [local count: 119292720]: + # DEBUG j =3D> 0 # DEBUG BEGIN_STMT b_7 =3D b_14 + 1; # DEBUG b =3D> b_7 # DEBUG b =3D> b_7 # DEBUG BEGIN_STMT if (b_7 <=3D 6) - goto ; [87.50%] + goto ; [85.71%] else - goto ; [12.50%] + goto ; [14.29%] [local count: 119292720]: # b_14 =3D PHI - # DEBUG b =3D> b_14 # DEBUG j =3D> 0 # DEBUG BEGIN_STMT goto ; [100.00%] [local count: 17041817]: + # DEBUG b =3D> 0 # DEBUG BEGIN_STMT optimize_me_not (); # DEBUG BEGIN_STMT So in addition to updating BB profile, we indeed end up moving debug statem= ents around. The change of dump is: + Analyzing: if (b_1 <=3D 6) + Will eliminate peeled conditional in bb 6. + May duplicate bb 6 + Not duplicating bb 8: it is single succ. + Analyzing: if (j_2 <=3D 7) + Will eliminate peeled conditional in bb 4. + May duplicate bb 4 + Not duplicating bb 3: it is single succ. Loop 2 is not do-while loop: latch is not empty. + Duplicating header BB to obtain do-while loop Copying headers of loop 1 Will duplicate bb 6 - Not duplicating bb 8: it is single succ. -Duplicating header of the loop 1 up to edge 6->8, 2 insns. +Duplicating header of the loop 1 up to edge 6->7 Loop 1 is do-while loop Loop 1 is now do-while loop. +Exit count: 17041817 (estimated locally) +Entry count: 17041817 (estimated locally) +Peeled all exits: decreased number of iterations of loop 1 by 1. Copying headers of loop 2 Will duplicate bb 4 - Not duplicating bb 3: it is single succ. -Duplicating header of the loop 2 up to edge 4->3, 2 insns. +Duplicating header of the loop 2 up to edge 4->5 Loop 2 is do-while loop Loop 2 is now do-while loop. +Exit count: 119292720 (estimated locally) +Entry count: 119292720 (estimated locally) +Peeled all exits: decreased number of iterations of loop 2 by 1. Dumps moved around, but we do same duplicaitons as before (BB6 and BB4 to eliminate the conditionals). [local count: 1073741824]: # j_2 =3D PHI <0(8), j_9(3)> # DEBUG j =3D> j_2 # DEBUG BEGIN_STMT if (j_2 <=3D 7) goto ; [88.89%] else goto ; [11.11%] [local count: 136334537]: # b_1 =3D PHI <0(2), b_7(5)> # DEBUG b =3D> b_1 # DEBUG BEGIN_STMT if (b_1 <=3D 6) goto ; [87.50%] else goto ; [12.50%]=