From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 10A9D3858D33; Wed, 9 Aug 2023 01:35:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10A9D3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691544930; bh=jaAkzS6xosLfTY8BAKTBafRWX4Wl9HaYbf+1Z3/Q+0Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rH9GuGJda3akbRvlAMWfrIQ49XKIKzpkNSbpLJg/jRF7KeXUOGXaINM8aa9krV5zN /W0WZK8JYyjsrxL+66MobUgLkameS3ojzGJjcIfrzWG8V3U/jV5/PzBQudwpigRqmq dr1h31I2W6q4AsPjGk26zOpQ63JufsIfk05ZqND4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110931] [14 Regression] Dead Code Elimination Regression since r14-2890-gcc2003cd875 Date: Wed, 09 Aug 2023 01:35:29 +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: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: blocked 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=3D110931 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |85316 --- Comment #4 from Andrew Pinski --- (In reply to Andrew Pinski from comment #2) > Basically there is a missing VRP happening here: > l.0_1 [irange] int [-INF, -65536][0, 0][65536, +INF] > Partial equiv (b_6 pe8 l.0_1) > : > b_6 =3D (char) l.0_1; > ... > Obvious that b_6 will have the range [0,0] as the other parts of l.0_1 is > outside of that range. But for some reason VRP didn't figure that out here > ... Oh it looks like we don't prop NONZERO back and I missed that when I first looked at this. In this case we have: l&(short)(-1) =3D=3D 0 But we don't record that in the above, only a range ... Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D85316 [Bug 85316] [meta-bug] VRP range propagation missed cases=