From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 606033882AC1; Fri, 30 Jun 2023 21:47:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 606033882AC1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688161667; bh=4VtwlnrOi4SkS6M2Y+ypxn8FOTHsSrBeYKUWs+guCgY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jrpJafCvIPUhbH8zkf3csW/DFCKQoovPrH/a63yzq/WwGHmuR8qQDHENnMAq85HRW jgZq6mJ7ZwRD76Tfw6QB+I2TxSsz2FP/ZBOcx5QU+pUlqsyThyXyj4qvoqXLVQzfYz PAWAporgHx8TE+POnbg51xwsJzKXihlGq3SoG11E= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110503] [13/14 Regression] Dead Code Elimination Regression at -O3 since r13-322-g7f04b0d786e Date: Fri, 30 Jun 2023 21:47:47 +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: 14.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: 13.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed cf_reconfirmed_on bug_status 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=3D110503 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2023-06-30 Status|UNCONFIRMED |NEW --- Comment #2 from Andrew Pinski --- (In reply to Andrew Pinski from comment #1) > I noticed there is a missing optimization here (during VRP1): > _29 =3D _11 =3D=3D 0; > _30 =3D (unsigned int) _29; > _14 =3D -_30; > if (_14 > 2) >=20 > That is just: > if (_14 !=3D 0) > or: > if (_29 !=3D 0) > or rather: > if (_11 =3D=3D 0) I wonder if the above will decrease the "size" estimates enough to optimize this again ... Oh and had: # RANGE [irange] int [-128, 127] _10 =3D (intD.6) _9; # RANGE [irange] int [0, 1] NONZERO 0x1 _11 =3D 1 % _10; I wonder if we could optimize `1 % b` into just `b !=3D 1` (since 1 % 0 is undefined) which will further reduce things here.=