From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 125863858432; Tue, 28 Sep 2021 09:12:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 125863858432 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102511] [12 Regression] GCC produces incorrect code for -O3: first element of the array is skipped after r12-3903 Date: Tue, 28 Sep 2021 09:12:20 +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: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: blocker X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: aldyh at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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: Tue, 28 Sep 2021 09:12:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102511 --- Comment #8 from CVS Commits --- The master branch has been updated by Aldy Hernandez : https://gcc.gnu.org/g:fb8b72ebb5b0bf40f7dfef9154c42320ce46f2a7 commit r12-3916-gfb8b72ebb5b0bf40f7dfef9154c42320ce46f2a7 Author: Aldy Hernandez Date: Tue Sep 28 09:38:50 2021 +0200 Return VARYING in range_on_path_entry if nothing found. The problem here is that the solver's code solving unknown SSAs on entry to a path was returning UNDEFINED if there were no incoming edges to the start of the path that were not the function entry block. This caused a cascade of pain down stream. Tested on x86-64 Linux. PR tree-optimization/102511 gcc/ChangeLog: * gimple-range-path.cc (path_range_query::range_on_path_entry): Return VARYING when nothing found. gcc/testsuite/ChangeLog: * gcc.dg/pr102511.c: New test. * gcc.dg/tree-ssa/ssa-dom-thread-14.c: Adjust.=