From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EE2183858412; Fri, 20 Oct 2023 13:15:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EE2183858412 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697807746; bh=oM9FnmCmsu7ferYK0T+kxuwo2L3BDBccDqzwihtH4QU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DINN/0igXRh8xxHVIC/46vkhrUemR3celcK1ODo6qG9H9N6HlRNEqjFfQwAR61UzV 417cScEJP7NsxiIJ90TbIWlFTbDDTP9WKvgZUQawL5IIwpTTO19aHCcWcwHigrpukg l23vastMAkro0mEdGhgyHJtiE6sCoF2ZoL2Y5KFE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110243] [13/14 Regression] Wrong code at -O3 on x86_64-linux-gnu since r13-3875-g9e11ceef165 Date: Fri, 20 Oct 2023 13:15:46 +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: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D110243 --- Comment #9 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:44e7e4498c3cdc27e087ab80aa76dac41819702f commit r14-4789-g44e7e4498c3cdc27e087ab80aa76dac41819702f Author: Richard Biener Date: Fri Oct 20 14:08:46 2023 +0200 tree-optimization/110243 - IVOPTs introducing undefined overflow The following addresses IVOPTs rewriting expressions in its strip_offset without caring for definedness of overflow. Rather than the earlier attempt of just using the proper split_constant_offset from data-ref analysis the following adjusts IVOPTs helper trying to minimize changes from this fix, possibly easing backports. PR tree-optimization/110243 PR tree-optimization/111336 * tree-ssa-loop-ivopts.cc (strip_offset_1): Rewrite operations with undefined behavior on overflow to unsigned arithmetic. * gcc.dg/torture/pr110243.c: New testcase. * gcc.dg/torture/pr111336.c: Likewise.=