From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7A9DC3858C56; Wed, 6 Dec 2023 21:47:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A9DC3858C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701899235; bh=zUiwJenSjtxbKaMQwxgerx2DpjRi5r6ke5izz8txv2o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=O1HwVmnfXKDszYQy68ztsiDpAdmDOUX/l0mYNjc8iFsqnPS1fFj87VWa05VDvXqaH TEVatSp4T054aSZyAO8ojGUduRipO7xgLfOxQ5AHsMvnTdzg+g4FaqYsqI2sKlZV9R RkXLHDgajLpxEjfzkvOhLt+AfakhIcGU2zCU8fOk= From: "patrick at rivosinc dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112871] [14 Regression] RISCV ICE: in extract_insn, at recog.cc:2804 (unrecognizable insn) with -03 rv32gc_zicond Date: Wed, 06 Dec 2023 21:47:15 +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 X-Bugzilla-Severity: normal X-Bugzilla-Who: patrick at rivosinc dot com 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: attachments.created 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=3D112871 --- Comment #1 from Patrick O'Neill --- Created attachment 56821 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56821&action=3Dedit testcase-2-freport-bug-output Here's a different testcase that manifests the same error: int a, b, d, e, c; char *f; static int g; void h(long long i) { int *j =3D &g; ++*j; k: if (c >> d) { e =3D a % b; (*j =3D i) && ++*j; *f |=3D 1; if (i) goto k; } } > /scratch/tc-testing/tc-dec-6-trunk/build-rv64gcv/bin/riscv64-unknown-linu= x-gnu-gcc -march=3Drv32gcv_zicond -mabi=3Dilp32d -O1 red.c -freport-bug red.c: In function 'h': red.c:15:1: error: unrecognizable insn: 15 | } | ^ (insn 54 53 55 8 (set (reg:SI 192 [ g_lsm.9 ]) (if_then_else:SI (ne:SI (reg:SI 136 [ _9 ]) (const_int 0 [0])) (reg:SI 136 [ _9 ]) (reg:SI 193))) -1 (nil)) during RTL pass: vregs red.c:15:1: internal compiler error: in extract_insn, at recog.cc:2812 0xa2a25d _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../../gcc/gcc/rtl-error.cc:108 0xa2a27f _fatal_insn_not_found(rtx_def const*, char const*, int, char const= *) ../../../gcc/gcc/rtl-error.cc:116 0xa28b53 extract_insn(rtx_insn*) ../../../gcc/gcc/recog.cc:2812 0xedeaee instantiate_virtual_regs_in_insn ../../../gcc/gcc/function.cc:1611 0xedeaee instantiate_virtual_regs ../../../gcc/gcc/function.cc:1994 0xedeaee execute ../../../gcc/gcc/function.cc:2041 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See for instructions. Preprocessed source stored into /scratch/tmp/ccFI5hsr.out file, please atta= ch this to your bugreport. This testcase is a bit simpler since all the logic is in one function. It a= lso throws an ice with -O1 instead of -O3 that the previous testcase needed.=