From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4E6F03858423; Tue, 5 Dec 2023 21:29:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E6F03858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701811793; bh=inOApIuiS/QbbQkFOHubvvRy/TBVIVCFixf4JzA0Ckk=; h=From:To:Subject:Date:From; b=DVZIcS3SGYa4jE8L0kGPdsPYJOD6FrdtIOZ4VGOMyrYy8xKh1RzILhqzPQMWW16so /HwsAqqoAXJfC+e1XCENX6C8mDP3BPyCsGOnv+Rx2yWOgMzVbGseY34QlLa9PhzSdf UXl5I3yCtXR6sPXswMNFQ6mu+06ErfSodZk/EsWs= From: "patrick at rivosinc dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112871] New: [14 Regression] RISCV ICE: in extract_insn, at recog.cc:2804 (unrecognizable insn) with -03 rv32gc_zicond Date: Tue, 05 Dec 2023 21:29:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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 Bug ID: 112871 Summary: [14 Regression] RISCV ICE: in extract_insn, at recog.cc:2804 (unrecognizable insn) with -03 rv32gc_zicond Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: patrick at rivosinc dot com Target Milestone: --- Created attachment 56808 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56808&action=3Dedit -freport-bug output Output: > /scratch/tc-testing/tc-dec-4-trunk/build-rv64gcv/bin/riscv64-unknown-linu= x-gnu-gcc -mabi=3Dilp32d -march=3Drv32gc_zicond -O3 red.c -freport-bug red.c: In function 'k': red.c:17:1: error: unrecognizable insn: 17 | } | ^ (insn 104 103 105 14 (set (reg:SI 214) (if_then_else:SI (ne:SI (reg:SI 134 [ i.5_1 ]) (const_int 0 [0])) (reg:SI 134 [ i.5_1 ]) (reg:SI 215))) "red.c":13:7 discrim 6 -1 (nil)) during RTL pass: vregs red.c:17:1: internal compiler error: in extract_insn, at recog.cc:2804 0xa27c0b _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../../gcc/gcc/rtl-error.cc:108 0xa27c2d _fatal_insn_not_found(rtx_def const*, char const*, int, char const= *) ../../../gcc/gcc/rtl-error.cc:116 0xa26501 extract_insn(rtx_insn*) ../../../gcc/gcc/recog.cc:2804 0xedc05e instantiate_virtual_regs_in_insn ../../../gcc/gcc/function.cc:1610 0xedc05e instantiate_virtual_regs ../../../gcc/gcc/function.cc:1993 0xedc05e execute ../../../gcc/gcc/function.cc:2040 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/ccEMDYFG.out file, please atta= ch this to your bugreport. Testcase: short a, c; int b, d, i; volatile char e; static int f[] =3D {1, 1}; long g; int volatile h; short(j)() { return b ? a : 0; } void k() { l: h; g =3D 0; for (; g <=3D 2; g++) { d | ((i || j() & (0 =3D=3D f[g])) ^ i) && e; if (c) goto l; } } Godbolt: https://godbolt.org/z/31TYfjevE=