From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ABFA93952513; Tue, 2 May 2023 20:16:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ABFA93952513 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683058585; bh=S4zCXBoe1Lb02RYSkNOcLPm846XYilFofLUywe8dhaw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rb/dvKW5BRQfQv8GN6WP+SSPjeQG49xX7n5UK2p/SkbKNP/gYolA4C5TL1fzFxnaI LGmElegX+Sect9knhO5Y/euY1dB2sHbTBqrl4Fey5Nph8FEGUyFO/7L1tY2OqxMe/d 8bbUeZ6YnOTM053qS3+GVuAbjhgrswu3LQ4FYlkA= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109276] [11 Regression] ICE: in assign_stack_local_1, at function.cc:429 with -mpreferred-stack-boundary=2 Date: Tue, 02 May 2023 20:16:25 +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: 12.2.0 X-Bugzilla-Keywords: ice-on-valid-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: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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=3D109276 --- Comment #22 from CVS Commits --- The releases/gcc-11 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:623245bc3f4eed25db80dd5f5650c18cd7314b39 commit r11-10731-g623245bc3f4eed25db80dd5f5650c18cd7314b39 Author: Jakub Jelinek Date: Tue Mar 28 10:43:08 2023 +0200 i386: Require just 32-bit alignment for SLOT_FLOATxFDI_387 -m32 -mpreferred-stack-boundary=3D2 DImode temporaries [PR109276] The following testcase ICEs since r11-2259 because assign_386_stack_loc= al -> assign_stack_local -> ix86_local_alignment now uses 64-bit alignment for DImode temporaries rather than 32-bit as before. Most of the spots in the backend which ask for DImode temporaries are during expansion and those apparently are handled fine with -m32 -mpreferred-stack-boundary=3D2, we dynamically realign the stack in tha= t case (most of the spots actually don't need that alignment but at least one does), then 2 spots are in STV which I assume also work correctly. But during splitting we can create a DImode slot which doesn't need to = be 64-bit alignment (it is nicer for performance though), when we apparent= ly aren't able to detect it for dynamic stack realignment purposes. The following patch just makes the slot 32-bit aligned in that rare cas= e. 2023-03-28 Jakub Jelinek PR target/109276 * config/i386/i386.c (assign_386_stack_local): For DImode with SLOT_FLOATxFDI_387 and -m32 -mpreferred-stack-boundary=3D2= pass align 32 rather than 0 to assign_stack_local. * gcc.target/i386/pr109276.c: New test. (cherry picked from commit 4b5ef857f5faf09f274c0a95c67faaa80d198124)=