public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/115093] New: RISC-V Vector ICE in extract_insn: unrecognizable insn
@ 2024-05-14 19:49 jeremy.bennett at embecosm dot com
  2024-05-15 14:25 ` [Bug target/115093] " juzhe.zhong at rivai dot ai
  0 siblings, 1 reply; 2+ messages in thread
From: jeremy.bennett at embecosm dot com @ 2024-05-14 19:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115093
           Summary: RISC-V Vector ICE in extract_insn: unrecognizable insn
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jeremy.bennett at embecosm dot com
  Target Milestone: ---

Bug found in SPEC CPU 2017 625.x264_s.

Reproducer (test.c):

int a;
void
c (char d[], char h[][0], char i[][4][4])
{
  for (int b; b < 2; b++)
    for (int e = 0; e < 4; e++)
      for (int f = 0; f < 4; f++)
        {
          int g = e - 1;
          if (d[e] || d[g])
            i[b][e][f] = 2;
          else if (h[0][g] || a)
            i[b][e][f] = 0;
        }
}

Compile with:

riscv64-unknown-linux-gnu-gcc -march=rv64gcv -mabi=lp64d -c -Ofast test.c

Output:

test.c: In function 'c':
test.c:15:1: error: unrecognizable insn:
   15 | }
      | ^
(insn 1200 0 0 (parallel [
            (set (reg:RVVMF4QI 749 [orig:240 vect__217.22 ] [240])
                (unspec:RVVMF4QI [
                        (reg:DI 0 zero)
                    ] UNSPEC_VUNDEF))
            (clobber (scratch:DI))
        ]) -1
     (nil))
during RTL pass: reload
test.c:15:1: internal compiler error: in extract_insn, at recog.cc:2812
0xa95819 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/rtl-error.cc:108
0xa9583b _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/rtl-error.cc:116
0xa94117 extract_insn(rtx_insn*)
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/recog.cc:2812
0x10db392 ira_remove_insn_scratches(rtx_insn*, bool, _IO_FILE*, rtx_def*
(*)(rtx_def*))
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/ira.cc:5381
0x111df4f remove_insn_scratches
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/lra.cc:2154
0x111df4f lra_emit_move(rtx_def*, rtx_def*)
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/lra.cc:513
0x112c143 match_reload
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/lra-constraints.cc:1184
0x11383a4 curr_insn_transform
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/lra-constraints.cc:4778
0x1139c8b lra_constraints(bool)
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/lra-constraints.cc:5481
0x1120a52 lra(_IO_FILE*, int)
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/lra.cc:2442
0x10d673f do_reload
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/ira.cc:5973
0x10d673f execute
        /home/jeremy/gittrees/rise-qemu/gcc/gcc/ira.cc:6161
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

System information
==================

Using built-in specs.
COLLECT_GCC=riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/jeremy/gittrees/rise-qemu/install/libexec/gcc/riscv64-unknown-linux-gnu/15.0.0/lto-wrapper
Target: riscv64-unknown-linux-gnu
Configured with: /home/jeremy/gittrees/rise-qemu/gcc/configure
--target=riscv64-unknown-linux-gnu
--prefix=/home/jeremy/gittrees/rise-qemu/install
--with-sysroot=/home/jeremy/gittrees/rise-qemu/install/sysroot
--with-pkgversion=gbb5f619a938-dirty --with-system-zlib --enable-shared
--enable-tls --enable-languages=c,c++,fortran --disable-libmudflap
--disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls
--disable-bootstrap --src=/home/jeremy/gittrees/rise-qemu/gcc --enable-multilib
--with-abi=lp64d --with-arch=rv64gc --with-tune= --with-isa-spec=20191213
'CFLAGS_FOR_TARGET=-O2    -mcmodel=medany' 'CXXFLAGS_FOR_TARGET=-O2   
-mcmodel=medany'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240509 (experimental) (gbb5f619a938-dirty)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/115093] RISC-V Vector ICE in extract_insn: unrecognizable insn
  2024-05-14 19:49 [Bug target/115093] New: RISC-V Vector ICE in extract_insn: unrecognizable insn jeremy.bennett at embecosm dot com
@ 2024-05-15 14:25 ` juzhe.zhong at rivai dot ai
  0 siblings, 0 replies; 2+ messages in thread
From: juzhe.zhong at rivai dot ai @ 2024-05-15 14:25 UTC (permalink / raw)
  To: gcc-bugs

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

JuzheZhong <juzhe.zhong at rivai dot ai> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |juzhe.zhong at rivai dot ai

--- Comment #1 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
I think it's fixed by:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=44e7855e4e817a7f5a1e332cd95e780e57052dba

Confirmed on compiler explorer:

https://godbolt.org/z/qf5GzoKre

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-15 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-14 19:49 [Bug target/115093] New: RISC-V Vector ICE in extract_insn: unrecognizable insn jeremy.bennett at embecosm dot com
2024-05-15 14:25 ` [Bug target/115093] " juzhe.zhong at rivai dot ai

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).