From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F333C3853D36; Fri, 18 Aug 2023 06:52:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F333C3853D36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692341558; bh=W+6YDUSzR204zjEJ3p5z1nnflbmEM34SJyISLfhvzpo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NNIsoTFrBAxwyN+B62b78nLD4n0FkXYLjf0Qq0WBsDS4NEVrJCONwEr5qetdW/Cm0 dxZSCWdsNUhAbK/Gfyq7d29XEQRgMed/xui3O4nMuXTGRNiwbcEFDp+JMIFbU1vCeQ Nf4B1kMYdwSar5b9Dsye/cRMTaTrtddrwtCpID4o= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/100080] missed optimization for dead code elimination at -O3 (vs. -O2) Date: Fri, 18 Aug 2023 06:52:38 +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 X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: --- 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=3D100080 --- Comment #3 from Andrew Pinski --- I am thinking we should mark this as won't fix. In VRP2 we have: [local count: 105119324]: _7 =3D l_20(D) | 1; _8 =3D (unsigned int) _7; if (_8 <=3D 1) goto ; [41.00%] else goto ; [59.00%] ... 4->6 (T) _7 : [irange] int [0, 1] MASK 0x1 VALUE 0x0 4->6 (T) _8 : [irange] unsigned int [0, 1] 4->6 (T) l_20(D) : [irange] UNDEFINED ... =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D BB 6 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Imports: l_20(D)=20=20 Exports: _5 l_20(D)=20=20 _5 : l_20(D)(I)=20=20 _7 [irange] int [0, 1] MASK 0x1 VALUE 0x0 l_20(D) [irange] UNDEFINED [local count: 43098922]: _5 =3D (unsigned int) l_20(D); b =3D _7; if (_5 > 1) goto ; [37.49%] else goto ; [62.51%] We techincally could have [0,1] as the range for l_20(D) on the edge 4->6 And then that if goes away.=