From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2688C3858C33; Thu, 4 Apr 2024 07:00:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2688C3858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712214021; bh=1n7o2iSPYX+gLc9rjxkpBGJF4FRMiWh7b/u9EoGgudI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ju+OIiw8NqcBKaLGmxNFBX3tiWkk209ks6uIhmY2Tywju5e7IyE4I/yb7Zi319m1F gDkKCHorcumeEusmoEzfKgD+01DfhXmYHAB4k3xz/rAU512e5+feii148mDagrTUNu uHoZEjhztS2TRTReARRBB8so1KZCHde7Cubizylo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114551] [14 Regression] wrong code at -O3 on x86_64-linux-gnu since r14-2944 Date: Thu, 04 Apr 2024 07:00: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: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114551 --- Comment #7 from GCC Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:e152177b362143465e2b9d721ea632cae3f13445 commit r14-9781-ge152177b362143465e2b9d721ea632cae3f13445 Author: Richard Biener Date: Wed Apr 3 14:53:30 2024 +0200 tree-optimization/114551 - loop splitting and undefined overflow When loop splitting hoists a guard computation it needs to make sure that can be safely evaluated at this place when it was previously only conditionally evaluated. The following fixes this for the case of undefined overflow. PR tree-optimization/114551 * tree-ssa-loop-split.cc (split_loop): If the guard is only conditionally evaluated rewrite computations with possibly undefined overflow to unsigned arithmetic. * gcc.dg/torture/pr114551.c: New testcase.=