From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 61FBB3858CDB; Wed, 24 Jan 2024 13:00:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61FBB3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706101217; bh=tbFfUpNUF2EoqrisCzF8BGhCdlXtJVf+g+V2AFkvALE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SmrUIB/ZPb/BgSqUwNfBLJXE8Qx1VlcU7Qsi/qRIX348unZXtqYCF+D+70EsoLEpA omIQeW5jp3LB9i1r+S9ZBkuRet45MOiAT2u39tMafwcMkeeUZaBRjuF8G7nAhAOpGq MMEnKzXGKJ9oFItPmoyyvlROzPggpDBdjna+mVsU= From: "rearnsha 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: Wed, 24 Jan 2024 13:00:16 +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: rearnsha 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: 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=3D113510 --- Comment #6 from Richard Earnshaw --- (In reply to Andrew Pinski from comment #5) > Yes the peephole2 in thumb1.md looks wrong: > ``` > ;; Reloading and elimination of the frame pointer can > ;; sometimes cause this optimization to be missed. > (define_peephole2 > [(set (match_operand:SI 0 "arm_general_register_operand" "") > (match_operand:SI 1 "const_int_operand" "")) > (set (match_dup 0) > (plus:SI (match_dup 0) (reg:SI SP_REGNUM)))] > "TARGET_THUMB1 > && UINTVAL (operands[1]) < 1024 > && (UINTVAL (operands[1]) & 3) =3D=3D 0" > [(set (match_dup 0) (plus:SI (reg:SI SP_REGNUM) (match_dup 1)))] > "" > ) > ``` >=20 > Confirmed. Since this is a peephole and we're dealing with hard regs, we can just use "low_register_operand" as the predicate for operand 0.=