From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 649823858C50; Tue, 23 Jan 2024 20:44:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 649823858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706042647; bh=Ua4o/o2JNImIMGLi48BakwQvTm27ADcCa0J9pB8KCgA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FjfnsuKl0lmJ1VcDmYpE/OLGlywaB0M6mt5b0Np19WtxBLGEzFQ1ad3zKZ1iLTKqf 4dSK4g3F31F6PFNRDfm+0SA2pR9xYVMZzrM1NDPgqxokFtadAXoPCSiuvoz6zH4Mom MP4AMnMTIDMYxpMIpee91WAEPCCy7WUq8A8i//aE= From: "vmakarov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113510] [14 Regression] [ARM Thumb] ICE in extract_constrain_insn with CPU cortex-m23 Date: Tue, 23 Jan 2024 20:44:07 +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.0 X-Bugzilla-Keywords: ice-on-valid-code, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: vmakarov at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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=3D113510 Vladimir Makarov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at gcc dot gnu.org --- Comment #4 from Vladimir Makarov --- This is not a RA bug. I believe it is a bug in peephole optimization. Right after LRA and before peephole2 we have: (insn 28 13 15 2 (set (reg:SI 12 ip [127]) (const_int 8 [0x8])) "../../gcc/gcc/testsuite/gcc.c-torture/compile/nested-3.c":17:10 959 {*thumb1_movsi_insn} (nil)) (insn 15 28 16 2 (set (reg:SI 12 ip [127]) (plus:SI (reg:SI 12 ip [127]) (reg/f:SI 13 sp))) "../../gcc/gcc/testsuite/gcc.c-torture/compile/nested-3.c":17:10 935 {*thumb1_addsi3} (nil)) and peephole2 combines these two insns into (insn 39 13 16 2 (set (reg:SI 12 ip [127]) (plus:SI (reg/f:SI 13 sp) (const_int 8 [0x8]))) "../../gcc/gcc/testsuite/gcc.c-torture/compile/nested-3.c":17:10 -1 (nil)) which is wrong as output and the 1st operand of *thumb1_addsi3 should be a = low register but r12 is not a low register. If peephole2 took this into accoun= t, it would have not combined the 2 insns and we would have not this PR.=