From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 45D993858423; Tue, 5 Dec 2023 12:18:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45D993858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701778719; bh=tt0AdghBDgE2D7HUbbAVcJBNM4QnhksUAXCfC8u93b0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=N7R05XaIweWdeW503XYCnKg5vChG699XJaEMkVLMqe/en91bIB7y4TjKYBrzqVrC0 263J4YQrmBFmqpN2cQkxnyddBnryWvmzXuMq52l7jI99CcP8HLPw4pU6J/ai089uYD +QL77IX4DIX2U1wJkcMeUMxxDD5myYKYj80jDUZg= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112845] [11/12/13/14 Regression] ICE: in extract_insn, at recog.cc:2804 with -Os -fcf-protection -c since r8-3504 Date: Tue, 05 Dec 2023 12:18:38 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112845 --- Comment #3 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:e0786ca9a18c50ad08c40936b228e325193664b8 commit r14-6180-ge0786ca9a18c50ad08c40936b228e325193664b8 Author: Jakub Jelinek Date: Tue Dec 5 13:17:57 2023 +0100 i386: Fix -fcf-protection -Os ICE due to movabsq peephole2 [PR112845] The following testcase ICEs in the movabsq $(i32 << shift), r64 peephol= e2 I've added a while back to use smaller code than movabsq if possible. If i32 is 0xfa1e0ff3 and shift is not divisible by 8, then it creates an invalid insn (as 0xfa1e0ff3 CONST_INT is not allowed as x86_64_immediate_operand nor x86_64_zext_immediate_operand), the peepho= le2 even triggers on it again and again (this time with shift 0) until it g= ives up. The following patch fixes that. As ix86_endbr_immediate_operand needs a CONST_INT and it is hopefully rare, I chose to use FAIL rather than handling it in the condition (where I'd probably need to call ctz_hwi again etc.= ). 2023-12-05 Jakub Jelinek PR target/112845 * config/i386/i386.md (movabsq $(i32 << shift), r64 peephole2): FAIL if the new immediate is ix86_endbr_immediate_operand.=