From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 97D47385841D; Mon, 5 Aug 2024 14:27:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97D47385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1722868065; bh=Yry1TGuKnI05offdzeh8OPQMH6fogD+/kdVXUKUcds0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UjNTMOnc9tPjW7VnFOI24x7Sk6tWbo6hPgAyeFuGvji5OUL0o63VI/EjmSJ1COBFN Q5d1IJZkU++lwJeH6Phm2yexCL0Sw++MZMOlwDBtJVG0Y8d/0EwxQSTtc5edvpaKQD CLr/ZaMjh0bOIoq2Ug0CKewenpkf8K9G4vAsMjwU= From: "matz at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/116236] [LRA] [M68K] ICE insn does not satisfy its constraints Date: Mon, 05 Aug 2024 14:27:44 +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: 15.0 X-Bugzilla-Keywords: build, ice-on-valid-code, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: matz at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D116236 Michael Matz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matz at gcc dot gnu.org --- Comment #5 from Michael Matz --- re comment #2: yeah. I don't quite see how LRA can get away (in general) without ever calling the target constraint checkers with strict_p =3D=3D true. _This_ testcase can be made to work with a mega-hack, by making the generic= RTL analyzers just swap base and index in the cases of ties in the opposite way. By that IRA selects the right classes from the beginning, LRA heeds those assignment, and it then so happens that everything turns out right. Obviou= sly, as soon as the operands would be swapped then formerly working testcases wo= uld=20 then start to fail with the hack, so it's not a solution: diff --git a/gcc/rtlanal.cc b/gcc/rtlanal.cc index 4158a531bdd..514742d1cae 100644 --- a/gcc/rtlanal.cc +++ b/gcc/rtlanal.cc @@ -6727,7 +6727,7 @@ decompose_normal_address (struct address_info *info) /* In the event of a tie, assume the base comes first. */ if (baseness (*inner_ops[0], info->mode, info->as, PLUS, GET_CODE (*ops[1])) - >=3D baseness (*inner_ops[1], info->mode, info->as, PLUS, + > baseness (*inner_ops[1], info->mode, info->as, PLUS, GET_CODE (*ops[0]))) { set_address_base (info, ops[0], inner_ops[0]);=