From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C7B7D3858D1E; Wed, 9 Feb 2022 19:07:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7B7D3858D1E From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/104459] [9/10/11/12 Regression] '-fcompare-debug' failure w/ -O2 -funswitch-loops -fno-tree-dce Date: Wed, 09 Feb 2022 19:07:13 +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: 12.0 X-Bugzilla-Keywords: compare-debug-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 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, 09 Feb 2022 19:07:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104459 --- Comment #3 from Jakub Jelinek --- On the other side, df-scan.cc does in 3 other spots: /* By adding the ref directly, df_insn_rescan my not find any differences even though the block will have changed. So we need to mark the block dirty ourselves. */ if (!DEBUG_INSN_P (DF_REF_INSN (ref))) df_set_bb_dirty (bb); and /* The block must be marked as dirty now, rather than later as in df_insn_rescan and df_notes_rescan because it may not be there at rescanning time and the mark would blow up. DEBUG_INSNs do not make a block's data flow solution dirty (at worst the LUIDs are no longer contiguous). */ if (bb !=3D NULL && NONDEBUG_INSN_P (insn)) df_set_bb_dirty (bb); and if (!DEBUG_INSN_P (insn)) df_set_bb_dirty (bb); so I wonder if another fix wouldn't be just not call df_set_bb_dirty on DEBUG_INSN_P in df_insn_change_bb. But what do I know about df :(.=