From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 882E23858D1E; Mon, 20 May 2024 12:03:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 882E23858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716206624; bh=/dPDPoJVXbw+6CPEvUKvkhuiYYpoTa8RrdoHv0wRRx0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qsPSk9iJf/auy4s0doGYmnD39/Vt3sSeWjIaUG8AltU1lVCedo71a+6Gnn7Ay0scH 7YAji5lRgaX/BrwvZXsS2sRjdYq12MtwjUODoFEU0dfN/45kUQpRgBuVt2UxBWFLtl I/3s++XjOFPLSky87TqkOUYk03tucE5/7Al9v+Ms= From: "wilco at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115153] [14/15 Regression] Error: bad immediate value for 8-bit offset - armv7ve Date: Mon, 20 May 2024 12:03:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.1.0 X-Bugzilla-Keywords: assemble-failure, build X-Bugzilla-Severity: normal X-Bugzilla-Who: wilco at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: wilco at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to cc 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=3D115153 Wilco changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |wilco at gcc dot gn= u.org CC| |wilco at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #8 from Wilco --- Confirmed. Small example: long long f(long long *p) { return __atomic_load_n (p+32, __ATOMIC_RELAXED); } It only fails on ARM and if the offset is between 256 and 1024. This is a latent bug: arm_legitimate_index_p has an explicit check that disallows anything over 256, but an earlier check for VALID_NEON_DREG_MODE oddly enou= gh allows DImode and a larger range. Moving the Neon check after LDRD check fi= xes this. Note using ldrd_strd_offset_operand/Do should also work, but the existing c= ode for 'm' is supposed to handle this correctly.=