From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 434013858D38; Tue, 23 Apr 2024 05:53:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 434013858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713851591; bh=O5IyYaEYxtzjcWWw3ZuzRQypMZ9CqqY+9Qyo1eBSoR0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=K8T4u3QC1t+XcFOt1z+8XNe/NiUiYNJXDtSDmyNNSOrL++fJEEBKNWumG0p38Dtvu sjIUtSAOs7fMsb44ZUhvuINiSLsC4PZrbQWrFlD5G+SP32UPaXmLcM33hI4Man+UVY CREfunM71FghyHWFZf8282AB2LG5c9dX5yFz5swQ= 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: Tue, 23 Apr 2024 05:53:10 +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 #11 from Uro=C5=A1 Bizjak --- (In reply to Jakub Jelinek from comment #8) > (In reply to Uro=C5=A1 Bizjak from comment #7) > > (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))] > >=20 > > 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 sta= ck in > > advance and reload the value from the memory in this particular alterna= tive. >=20 > So, given the known ia32 register starvation, can't we split that first > alternative to > =3D&r,r,o with "nox64" isa and =3D&r,r,ro with "x64" isa? Yes, IMO this is an acceptable workaround, but please split the constraint = to (=3D&r,r,r) and (=3D&r,r,o), with the former limited to "x64" isa. This is = what the other patterns do, new mode attribute just hides the obvious fact.=