https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120223
Bug ID: 120223
Summary: [16 Regression] ICE: in extract_insn, at recog.cc:2882
unrecognizable insn: (xor:DI (reg:DI 136) (const_int
...)) with -mcpu=thead-c906
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: riscv64-unknown-linux-gnu
Created attachment 61404
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61404&action=edit
-freport-bug output
Compiler output:
$ echo 'long foo(long x) { return x ^ 0x80000000; }' |
riscv64-unknown-linux-gnu-gcc -mcpu=thead-c906 -xc -
<stdin>: In function 'foo':
<stdin>:1:43: error: unrecognizable insn:
(insn 7 6 10 2 (set (reg:DI 134 [ _2 ])
(xor:DI (reg:DI 136)
(const_int 2147483648 [0x80000000]))) "<stdin>":1:29 -1
(nil))
during RTL pass: vregs
<stdin>:1:43: internal compiler error: in extract_insn, at recog.cc:2882
0x374f341 internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:517
0x113757d fancy_abort(char const*, int, char const*)
/repo/gcc-trunk/gcc/diagnostic.cc:1815
0xbb6154 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/repo/gcc-trunk/gcc/rtl-error.cc:108
0xbb61d1 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/repo/gcc-trunk/gcc/rtl-error.cc:116
0xba6fe2 extract_insn(rtx_insn*)
/repo/gcc-trunk/gcc/recog.cc:2882
0x14e31f3 instantiate_virtual_regs_in_insn
/repo/gcc-trunk/gcc/function.cc:1612
0x14e31f3 instantiate_virtual_regs
/repo/gcc-trunk/gcc/function.cc:1995
0x14e31f3 execute
/repo/gcc-trunk/gcc/function.cc:2042
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.
$ riscv64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-riscv64/bin/riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20250511074635-r16-525-g004bf889e0b1b9-checking-yes-rtl-df-extra-nobootstrap-nographite-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/16.0.0/lto-wrapper
Target: riscv64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --without-cloog --without-ppl --without-isl
--with-isa-spec=2.2 --with-sysroot=/usr/riscv64-unknown-linux-gnu
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=riscv64-unknown-linux-gnu
--with-ld=/usr/bin/riscv64-unknown-linux-gnu-ld
--with-as=/usr/bin/riscv64-unknown-linux-gnu-as --disable-multilib
--enable-libsanitizer --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20250511074635-r16-525-g004bf889e0b1b9-checking-yes-rtl-df-extra-nobootstrap-nographite-riscv64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20250511 (experimental) (GCC)