From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BEF01385842D; Wed, 20 Oct 2021 12:49:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEF01385842D From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102844] [9/10/11/12 Regression] DOM jump threading not copying block that became non-empty Date: Wed, 20 Oct 2021 12:49:28 +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: 9.3.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com 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, 20 Oct 2021 12:49:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102844 --- Comment #22 from Andrew Macleod --- (In reply to Richard Biener from comment #20) > (In reply to Aldy Hernandez from comment #18) > > (In reply to rguenther@suse.de from comment #17) > > > On Wed, 20 Oct 2021, aldyh at gcc dot gnu.org wrote: > >=20 > > > > Silly question, why is the SSA form invalid on entry to VRP2? That= 's just > > > > asking for trouble. Is this related to how asserts work? > > >=20 > > > Well, DOM threading creates invalid SSA (definition not dominating us= e). > > > Doesn't have to do anything with VRP or asserts. > >=20 > > Ah, I see. > >=20 > > BTW, if this is still the case in mainline, this is bound to be a probl= em > > for the ranger. Andrew, won't we get an UNDEFINED / unreachable if we = query > > the non dominating use at this point? >=20 > Well, invalid IL is invalid - there's no need to "cope" with it. We have= to > fix the (forward) threading code. Indeed, invalid is invalid. And it depends. Any on-entry range is the union of all incoming blocks. If = we query a use that has no def anywhere in the dominator tree , then you will = get UNDEFINED. If the def is on at least one incoming path, then you will get t= he def or some derivative of it.=