https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99249
Bug ID: 99249 Summary: SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat) Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- The following fails: $ cat test.cc #include <arm_sve.h> extern char b[]; int x; void f() { while (x) { x = svaddv( svnot_z(svnot_z(svptrue_pat_b8(SV_VL6), svmov_z(svptrue_pat_b8(SV_VL1), svptrue_pat_b16(SV_VL3))), svptrue_pat_b64(SV_VL2)), svdup_s32(8193)); for (int j = x; j; j++) b[j] = 0; } } $ aarch64-linux-gnu-gcc -c -march=armv8.2-a+sve -Os test.cc during RTL pass: early_remat test.cc: In function ‘void f()’: test.cc:15:1: internal compiler error: in aarch64_expand_sve_const_vector, at config/aarch64/aarch64.c:4956 15 | } | ^ 0x14ffb66 aarch64_expand_sve_const_vector /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:4956 0x15019b1 aarch64_expand_mov_immediate(rtx_def*, rtx_def*) /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:5395 0x19afb10 gen_movvnx16qi(rtx_def*, rtx_def*) /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64-sve.md:662 0xcab8e6 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*, rtx_def*) const /home/alecop01/toolchain/src/gcc/gcc/recog.h:407 0xcab8e6 emit_move_insn_1(rtx_def*, rtx_def*) /home/alecop01/toolchain/src/gcc/gcc/expr.c:3766 0xcabe37 emit_move_insn(rtx_def*, rtx_def*) /home/alecop01/toolchain/src/gcc/gcc/expr.c:3936 0xc7e694 force_reg(machine_mode, rtx_def*) /home/alecop01/toolchain/src/gcc/gcc/explow.c:677 0x14ffc4f aarch64_expand_sve_const_vector /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:4964 0x15019b1 aarch64_expand_mov_immediate(rtx_def*, rtx_def*) /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:5395 0x19afb10 gen_movvnx16qi(rtx_def*, rtx_def*) /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64-sve.md:662 0xcab8e6 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*, rtx_def*) const /home/alecop01/toolchain/src/gcc/gcc/recog.h:407 0xcab8e6 emit_move_insn_1(rtx_def*, rtx_def*) /home/alecop01/toolchain/src/gcc/gcc/expr.c:3766 0xcabe37 emit_move_insn(rtx_def*, rtx_def*) /home/alecop01/toolchain/src/gcc/gcc/expr.c:3936 0xc7e614 copy_to_mode_reg(machine_mode, rtx_def*) /home/alecop01/toolchain/src/gcc/gcc/explow.c:653 0xf69b69 maybe_legitimize_operand /home/alecop01/toolchain/src/gcc/gcc/optabs.c:7626 0xf69b69 maybe_legitimize_operands(insn_code, unsigned int, unsigned int, expand_operand*) /home/alecop01/toolchain/src/gcc/gcc/optabs.c:7758 0xf69e52 maybe_gen_insn(insn_code, unsigned int, expand_operand*) /home/alecop01/toolchain/src/gcc/gcc/optabs.c:7777 0xf6a06e maybe_expand_insn(insn_code, unsigned int, expand_operand*) /home/alecop01/toolchain/src/gcc/gcc/optabs.c:7820 0xf69605 expand_insn(insn_code, unsigned int, expand_operand*) /home/alecop01/toolchain/src/gcc/gcc/optabs.c:7851 0x14d45d2 aarch64_sve_emit_int_cmp /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:3920 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.