From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 823993893675; Mon, 1 Mar 2021 09:22:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 823993893675 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/99305] [11 Regression] range condition simplification after inlining Date: Mon, 01 Mar 2021 09:22:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: missed-optimization, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords bug_status everconfirmed target_milestone cf_reconfirmed_on 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: Mon, 01 Mar 2021 09:22:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99305 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization, | |needs-bisection Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Target Milestone|--- |11.0 Last reconfirmed| |2021-03-01 --- Comment #1 from Richard Biener --- Confirmed. Some forwprop/match.pd prevents phiopt to trigger: GCC 10 (forwprop->phiopt): [local count: 1073741824]: _7 =3D (unsigned char) c_2(D); _8 =3D _7 + 208; - if (_8 <=3D 9) - goto ; [50.00%] - else - goto ; [50.00%] - - [local count: 536870913]: - - [local count: 1073741824]: - # iftmp.1_1 =3D PHI <1(3), 0(2)> - return iftmp.1_1; + _9 =3D _8 <=3D 9; + return _9; forwprop difference GCC 10/11: - Replaced '_9 !=3D 0' with '_8 <=3D 9' -bar (char c) +bool bar (char c) { bool iftmp.1_1; - unsigned char _7; - unsigned char _8; + unsigned char c.0_4; + unsigned char _5; + bool _6; + bool _7; [local count: 1073741824]: - _7 =3D (unsigned char) c_2(D); - _8 =3D _7 + 208; - if (_8 <=3D 9) + if (c_2(D) !=3D 0) goto ; [50.00%] else goto ; [50.00%] [local count: 536870913]: + c.0_4 =3D (unsigned char) c_2(D); + _5 =3D c.0_4 + 208; + _6 =3D _5 <=3D 9; + _7 =3D -_6; [local count: 1073741824]: - # iftmp.1_1 =3D PHI <1(3), 0(2)> + # iftmp.1_1 =3D PHI <_7(3), 0(2)> return iftmp.1_1;=