From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 62E9F387700D; Thu, 12 Mar 2020 18:47:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62E9F387700D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584038824; bh=9dBgf3hc8BdGo1/N2/7yC8AmVa7S6zJK67UJ/bancv0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pESUW+VjSCbxb0QLXOZjL2o18+m49j5S24TkjcBGF2VKzG7hPVNo76xEJX5Pwi3Cb d9JF2vx7mG3W3/c21VSvF0NzwrEQGuaQBuyKH3YYprykMula1h9x+8VPFgyMfjgDcH R68CZ4qCU/eXGJodAo1YliVHJi64XE+YadvXHc3o= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/91913] [8/9 Regression] ICE in extract_constrain_insn, at recog.c:2211 Date: Thu, 12 Mar 2020 18:47:04 +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: 10.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rearnsha at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2020 18:47:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D91913 --- Comment #14 from Martin Li=C5=A1ka --- commit r9-8364-g08f00a213f8a1b99bbf3ad3c337dea249a288cf1 Author: Richard Earnshaw Date: Fri Mar 6 10:04:51 2020 +0000 arm: correct constraints on movsi_compare0 [PR91913] The peephole that detects a mov of one register to another followed by a comparison of the original register against zero is only used in Arm state; but the instruction that matches this is generic to all 32-bit compilation states. That instruction lacks support for SP which is permitted in Arm state, but has restrictions in Thumb2 code. This patch fixes the problem by allowing SP when in ARM state for all registers; in Thumb state it allows SP only as a source when the register really is copied to another target. gcc/ChangeLog: PR target/91913 Backport from master * config/arm/arm.md (movsi_compare0): Allow SP as a source regi= ster in Thumb state and also as a destination in Arm state. Add T16 variants. gcc/testsuite/ChangeLog: 2020-02-10 Jakub Jelinek PR target/91913 Backport from master * gfortran.dg/pr91913.f90: New test.=