public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "patrick at rivosinc dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/113001] New: [14 Regression] RISCV Zicond ICE: in extract_insn, at recog.cc:2812 with -O2 rv64gcv_zicond
Date: Wed, 13 Dec 2023 19:08:55 +0000	[thread overview]
Message-ID: <bug-113001-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113001

            Bug ID: 113001
           Summary: [14 Regression] RISCV Zicond ICE: in extract_insn, at
                    recog.cc:2812 with -O2 rv64gcv_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 56872
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56872&action=edit
-freport-bug output

> /scratch/tc-testing/tc-dec-13-trunk/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gc_zicond -mabi=lp64d -O2 red.c -freport-bug
red.c: In function 'g':
red.c:11:1: error: unrecognizable insn:
   11 | }
      | ^
(insn 14 13 15 4 (set (reg:DI 145)
        (if_then_else:DI (ne:DI (reg:DI 138 [ _7 ])
                (const_int 0 [0]))
            (reg:DI 138 [ _7 ])
            (reg:DI 146))) -1
     (nil))
during RTL pass: vregs
red.c:11:1: internal compiler error: in extract_insn, at recog.cc:2812
0xa2a515 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../../gcc/gcc/rtl-error.cc:108
0xa2a537 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ../../../gcc/gcc/rtl-error.cc:116
0xa28e0b extract_insn(rtx_insn*)
        ../../../gcc/gcc/recog.cc:2812
0xedee3e instantiate_virtual_regs_in_insn
        ../../../gcc/gcc/function.cc:1611
0xedee3e instantiate_virtual_regs
        ../../../gcc/gcc/function.cc:1994
0xedee3e 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 <https://gcc.gnu.org/bugs/> for instructions.
Preprocessed source stored into /scratch/tmp/ccw1t5xI.out file, please attach
this to your bugreport.

Testcase:
long a, b;
int c, d;
void e(long *f) {
  (b = *f) && --b;
  for (; c;)
    ;
}
void g() {
  for (; d; d--)
    e(&a);
}

Godbolt: https://godbolt.org/z/s6hqh6eo8

-freport bug output is attached.

pr112871 looks related but is on rv32gc_zicond.

             reply	other threads:[~2023-12-13 19:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13 19:08 patrick at rivosinc dot com [this message]
2023-12-14  2:40 ` [Bug target/113001] " patrick at rivosinc dot com
2023-12-14 13:48 ` rguenth at gcc dot gnu.org
2024-02-22 21:33 ` pinskia at gcc dot gnu.org
2024-03-04  4:20 ` law at gcc dot gnu.org
2024-03-05  0:09 ` law at gcc dot gnu.org
2024-03-06 16:58 ` cvs-commit at gcc dot gnu.org
2024-03-06 17:00 ` law at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113001-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).