https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116720
Bug ID: 116720 Summary: [13/14/15 Regression] RISC-V: Unrecognizable insn with xtheadmemidx on rv32 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: patrick at rivosinc dot com Target Milestone: --- Testcase: struct a { signed : 22; }; volatile short b; int *c; void d(int e, struct a) { b; c = &e; } Command/backtrace: > /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/riscv64-unknown-linux-gnu-gcc > -O3 -march=rv32ixtheadmempair -mabi=ilp32 -mno-strict-align > preprocessed.c -c -S -o /dev/null preprocessed.c: In function 'd': preprocessed.c:9:1: error: unrecognizable insn: 9 | } | ^ (insn 31 13 14 2 (parallel [ (set (mem/c:SI (plus:SI (reg/f:SI 2 sp) (const_int 8 [0x8])) [4 D.2262+0 S4 A8]) (reg:SI 11 a1)) (set (mem/c:SI (plus:SI (reg/f:SI 2 sp) (const_int 12 [0xc])) [3 e+0 S4 A32]) (reg:SI 10 a0 [ e ])) ]) "preprocessed.c":6:25 -1 (expr_list:REG_DEAD (reg:SI 11 a1) (expr_list:REG_DEAD (reg:SI 10 a0 [ e ]) (nil)))) during RTL pass: cprop_hardreg preprocessed.c:9:1: internal compiler error: in extract_insn, at recog.cc:2882 0x2e376e5 internal_error(char const*, ...) ../../../gcc/gcc/diagnostic-global-context.cc:517 0xc52bb0 fancy_abort(char const*, int, char const*) ../../../gcc/gcc/diagnostic.cc:1657 0xae614b _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../../gcc/gcc/rtl-error.cc:108 0xae616d _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../../gcc/gcc/rtl-error.cc:116 0xae4a21 extract_insn(rtx_insn*) ../../../gcc/gcc/recog.cc:2882 0x12e809f extract_constrain_insn(rtx_insn*) ../../../gcc/gcc/recog.cc:2781 0x12ec09c copyprop_hardreg_forward_1 ../../../gcc/gcc/regcprop.cc:836 0x12ed14f execute ../../../gcc/gcc/regcprop.cc:1423 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. Godbolt: https://godbolt.org/z/sjoMj1c4E Tested with: riscv64-unknown-linux-gnu-gcc (gb56bd542942) 15.0.0 20240914 (experimental) Found via fuzzer.