https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108832
Bug ID: 108832 Summary: [13 Regression] ICE in replace_rtx, at rtlanal.cc:3358 Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- Target: x86_64-pc-linux-gnu gcc 13.0.1 20230212 snapshot (g:06ca0c9abb260266b688e2c2154c72214bb47076) ICEs when compiling the following testcase w/ -O2 -funroll-loops: unsigned int m; short int n; long int bar (unsigned int x) { return x ? x : 1; } __attribute__ ((simd)) void foo (void) { int a; a = m / bar (3); n = 1 % bar (a << 1); } % x86_64-pc-linux-gnu-gcc-13 -O2 -funroll-loops -c rxkpgn0d.c during RTL pass: peephole2 rxkpgn0d.c: In function 'foo.simdclone.7': rxkpgn0d.c:17:1: internal compiler error: in replace_rtx, at rtlanal.cc:3358 17 | } | ^ 0x73a043 replace_rtx(rtx_def*, rtx_def*, rtx_def*, bool) /var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/rtlanal.cc:3358 0xe97803 replace_rtx(rtx_def*, rtx_def*, rtx_def*, bool) /var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/rtlanal.cc:3397 0xe97803 replace_rtx(rtx_def*, rtx_def*, rtx_def*, bool) /var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/rtlanal.cc:3397 0x19035d6 gen_peephole2_125(rtx_insn*, rtx_def**) /var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/config/i386/i386.md:22054 0x1c816cc peephole2_17 /var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/config/i386/i386.md:1077 0x1c816cc peephole2_19 /var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/config/i386/i386.md:1094 0x1cbb55d peephole2_46 /var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/config/i386/i386.md:5200 0xe62447 peephole2_optimize /var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/recog.cc:4180 0xe62447 rest_of_handle_peephole2 /var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/recog.cc:4331 0xe62447 execute /var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/recog.cc:4368