From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2ECCA384AB5F; Mon, 22 Apr 2024 20:07:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2ECCA384AB5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713816428; bh=3A9HqKaOpTXJvbfuPKBy3g7c+w7XDExcS0d8Rldktw8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eh1hNdcsci5Fjp0DZwb3Xh+g62VZFczvug5jPKTc0jnMYddF4WfonPbRWz9VCJMIb qU4BJ7q4ZPsWAk8ZUCxp7vPAtFce2nR1O5mrIm888v0H6LXQ9b8XtxO6U7uI5vydjg lJfYnKffrAjKtYqpi8LCj+T2ouRT9+pqAWPeSjzw= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/114810] [14 Regression] internal compiler error: in lra_split_hard_reg_for, at lra-assigns.cc:1868 (unable to find a register to spill) {*andndi3_doubleword_bmi} with -m32 -mstackrealign -O2 -mbmi -fno-exceptions -fno-plt Date: Mon, 22 Apr 2024 20:07:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ra X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned 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=3D114810 --- Comment #7 from Uro=C5=A1 Bizjak --- (In reply to Vladimir Makarov from comment #6) > The problem is that the alternative assumes 3 DI values live simultaneous= ly. > This means 6 regs and we have only 6 available ones. One input reg is > assigned to 0 another one is to 3. So we have [01]2[34]5, where regs in > brackets are taken by the operands. Although there are still 2 regs but > they can not be used as they are not adjacent. >=20 > The one solution is to somehow penalize the chosen alternative by changing > alternative heuristics in lra-constraints.cc. But it definitely can affe= ct > other targets in some unpredicted way. So the solution is too risky > especially at this stage. Also it might be possible that there is no > alternative with less 3 living pseudos for some different insn case. >=20 > I don't see non-risky solution right now. I'll be thinking how to better > fix this. Please note that the insn is defined as: (define_insn_and_split "*andn3_doubleword_bmi" [(set (match_operand: 0 "register_operand" "=3D&r,r,r") (and: (not: (match_operand: 1 "register_operand" "r,0,r")) (match_operand: 2 "nonimmediate_operand" "ro,ro,0"))) (clobber (reg:CC FLAGS_REG))] where the problematic alternative (=3D&r,r,ro) allows a memory input in its operand 2 constraint. The allocator could spill a DImode value to a stack in advance and reload the value from the memory in this particular alternative= .=