From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 61F2C3858404; Wed, 29 Dec 2021 02:29:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61F2C3858404 From: "luoxhu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103802] [12 regression] recip-3.c fails after r12-6087 on Power m32 Date: Wed, 29 Dec 2021 02:29:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: missed-optimization, testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: luoxhu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2021 02:29:51 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103802 --- Comment #4 from luoxhu at gcc dot gnu.org --- Or restore the previous recip count check by comment out the if condition to avoid bb in loop turns cold? diff --git a/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c b/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c index 641c91e719e..d3c3053486d 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c @@ -14,7 +14,13 @@ float h () E =3D 1. - d; for( i=3D0; i < 2; i++ ) - if( d > 0.01 ) + // if( d > 0.01 ) + /* The if condition will make followed bb cold (profile cou= nt + less then the loop preheader), while r12-6087 is a + optimization that avoids move COLD invariant expression = out + of loop, since this test case is to test recip expression + could be CSE and eliminated, so comment the condition to keep + the test point. */ { P =3D ( W < E ) ? (W - E)/d : (E - W)/d; F[i] +=3D P; @@ -23,4 +29,4 @@ float h () F[0] +=3D E / d; } -/* { dg-final { scan-tree-dump-times " / " 5 "recip" } } */ +/* { dg-final { scan-tree-dump-times " / " 1 "recip" } } */=