From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A6E66387700D; Thu, 12 Mar 2020 18:46:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6E66387700D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584038805; bh=Pa98c2joeGFuZe1tkSnbw6jRfqrdluWgGp9jhw24sok=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xfVE59Vvvi6/uLnjVkoeY8oHBW/pD/bIhZxtVE6RdtAWv2iwDXWWQpD0DpALQBlqK 9zcF71TIhw6VXjMll4Z7/2XTrtQ3cBwjOK1ur6NRkDRHyZO2fQHZYxkGkItnRCNx52 FJw1HlOgh6CeTgbjvfmupvMGHEtVn8Rk0K36U3ic= 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:46:45 +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:46:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D91913 --- Comment #13 from Martin Li=C5=A1ka --- commit r8-10119-g3d46f4875c6c50e8095294b6b700d6678a7e2f1e 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.=