https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115169
Bug ID: 115169 Summary: [14 regression] ICE in loongarch bootstrap with checking: RTL check: expected code 'reg', have 'const_int' in rhs_regno, at rtl.h:1934 Product: gcc Version: 14.1.1 Status: UNCONFIRMED Keywords: ice-checking Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: matoro_gcc_bugzilla at matoro dot tk Target Milestone: --- Host: loongarch64-unknown-linux-gnu Target: loongarch64-unknown-linux-gnu Build: loongarch64-unknown-linux-gnu There seems to be a couple RISC-V items with similar stack traces but unsure if they are the same bug. Trying to upgrade 13 -> 14 on a 3A5000 and I get a SIGILL from genmodes, so fell back to checking build and unfortunately encountered an ICE there as well. Unsure if this is the cause of the SIGILL or not, so one bug at a time. /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/build/./gcc/ -B/usr/loongarch64-unknown-linux-gnu/bin/ -B/usr/loongarch64-unknown-linux-gnu/lib/ -isystem /usr/loongarch64-unknown-linux-gnu/include -isystem /usr/loongarch64-unknown-linux-gnu/sys-include -fmultiflags -fno-checking -g -ggdb3 -O2 -O2 -g -ggdb3 -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fno-stack-clash-protection -fpic -I. -I. -I../.././gcc -I/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/libgcc -I/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/libgcc/. -I/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/libgcc/../gcc -I/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/libgcc/../include -DHAVE_CC_TLS -o _mulvdi3.o -MT _mulvdi3.o -MD -MP -MF _mulvdi3.dep -DL_mulvdi3 -c /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS during RTL pass: ce1 /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/libgcc/libgcc2.c: In function ‘__mulvti3’: /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/libgcc/libgcc2.c:376:1: internal compiler error: RTL check: expected code 'reg', have 'const_int' in rhs_regno, at rtl.h:1934 376 | } | ^ 0x55555776ca7b rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int, char const*) /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/rtl.cc:770 0x55555777e457 rhs_regno(rtx_def const*) /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/rtl.h:1934 0x5555584be663 rhs_regno(rtx_def const*) ./genrtl.h:38 0x5555584be663 loongarch_expand_conditional_move(rtx_def**) /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/config/loongarch/loongarch.cc:5355 0x5555589f5293 gen_movdicc(rtx_def*, rtx_def*, rtx_def*, rtx_def*) /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/config/loongarch/loongarch.md:2556 0x555557e74ceb maybe_expand_insn(insn_code, unsigned int, expand_operand*) /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/optabs.cc:8275 0x555557e74ceb emit_conditional_move_1 /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/optabs.cc:5249 0x555557e751c7 emit_conditional_move(rtx_def*, rtx_comparison, rtx_def*, rtx_def*, machine_mode, int) /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/optabs.cc:5162 0x555558c3c02b noce_emit_cmove /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/ifcvt.cc:1777 0x555558c4062b noce_try_cmove_arith /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/ifcvt.cc:2363 0x555558c4644f noce_process_if_block /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/ifcvt.cc:4161 0x555558c4644f noce_find_if_block /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/ifcvt.cc:4716 0x555558c479c3 find_if_header /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/ifcvt.cc:4921 0x555558c479c3 if_convert /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/ifcvt.cc:6068 0x555558c48b97 rest_of_handle_if_conversion /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/ifcvt.cc:6133 0x555558c48b97 execute /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/gcc/ifcvt.cc:6172