From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3E5163858D33; Tue, 6 Feb 2024 16:18:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E5163858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707236332; bh=F33iECnXVm8goE9b1wuAWMurNb7p1E5dzZ8hfJWtyk8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XBQImoztLhtAXGgHQp8jHOqJGLPOC8z5AtLDpuPYKG1Z4D1RYXJ2xKgnoXjHb8T/7 erxRijDcw5VMiYtbAV5T69FPBlqWi94psxhWT718R14RcZymP6sOSZ+SvE93B979gP e1NcjfjUXk34gxiBJ+Q64QgboHFtbtSj/jUUJLHo= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113787] [12/13/14 Regression] Wrong code at -O with ipa-modref on aarch64 Date: Tue, 06 Feb 2024 16:18:51 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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: 12.4 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=3D113787 --- Comment #9 from Andrew Pinski --- _57 =3D &MEM[(int *)0B + _56 + _55 * 1]; *_57 =3D _14; The fix for PR 110702 must not have been enough. Or rather this part of the explanation was fully true: ``` The patch below recognizes the fallback after the fact and transforms the TARGET_MEM_REF memory reference into a LEA for which this form isn't problematic: _24 =3D &MEM[(long int *)0B + ivtmp.36_34 + ivtmp.28_44 * 4]; _3 =3D *_24; ``` Maybe it was enough for GCC 13/12 branches but the trunk it was not.=