From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 94EED3858CD1; Tue, 9 Apr 2024 07:12:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 94EED3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712646770; bh=yJ0zF2BHhS9J89yHbfIEPfs6nSrgeSfoezs7fyoj1Us=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uVO5TcxJFSAaSYlBh5zIUIDGZjQ8CwHTy21NIqDg1mmEe1nQGTezqbMsvwHoe2CAi ZHotDm7JEZIezb3FfT2bPblJS/jaqVJIyVOzyKDfR4l5XtBMDWMen141UZndhZmnD7 k6tY/tDlgXQxqfvL+KbKfLNijGDTmhbm3vHVxQSQ= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114647] missing DSE when looping over a VLA Date: Tue, 09 Apr 2024 07:12:50 +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: enhancement X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to 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=3D114647 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org Status|NEW |ASSIGNED --- Comment #2 from Richard Biener --- /* If we visit this PHI by following a backedge then = we have to make sure ref->ref only refers to SSA names that are invariant with respect to the loop represented by this PHI node. */ if (dominated_by_p (CDI_DOMINATORS, gimple_bb (stmt), gimple_bb (use_stmt)) && !for_each_index (ref->ref ? &ref->ref : &ref->base, check_name, gimple_bb (use_stmt))) return DSE_STORE_LIVE; we could make this bail-out "delayed" until we hit the next possible use in the loop (of which there is none).=