https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113828

            Bug ID: 113828
           Summary: ICE: in riscv_expand_mult_with_const_int, at
                    config/riscv/riscv.cc:2587 with -march=rv64ifv and
                    vfloat32m1_t/vfloat32m4_t function args
           Product: gcc
           Version: 14.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 57356
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57356&action=edit
reduced testcase

Compiler output:
$ riscv64-unknown-linux-gnu-gcc -march=rv64ifv testcase.c
during RTL pass: expand
testcase.c: In function 'foo':
testcase.c:5:1: internal compiler error: in riscv_expand_mult_with_const_int,
at config/riscv/riscv.cc:2587
    5 | foo(vfloat32m1_t a, vfloat32m4_t b)
      | ^~~
0xb89743 riscv_expand_mult_with_const_int
        /repo/gcc-trunk/gcc/config/riscv/riscv.cc:2587
0xb89743 riscv_legitimize_poly_move(machine_mode, rtx_def*, rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/riscv/riscv.cc:2655
0x1ae545e riscv_legitimize_move(machine_mode, rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/riscv/riscv.cc:2759
0x21f74e0 gen_movdi(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/riscv/riscv.md:2174
0x12cd260 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
        /repo/gcc-trunk/gcc/recog.h:441
0x12cd260 emit_move_ccmode
        /repo/gcc-trunk/gcc/expr.cc:4425
0x12cd260 emit_move_insn_1(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:4570
0x12cd66d emit_move_insn(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:4721
0x12a19d0 copy_to_mode_reg(machine_mode, rtx_def*)
        /repo/gcc-trunk/gcc/explow.cc:659
0x159c3d2 maybe_legitimize_operand
        /repo/gcc-trunk/gcc/optabs.cc:8058
0x159c3d2 maybe_legitimize_operands(insn_code, unsigned int, unsigned int,
expand_operand*)
        /repo/gcc-trunk/gcc/optabs.cc:8201
0x1598609 maybe_gen_insn(insn_code, unsigned int, expand_operand*)
        /repo/gcc-trunk/gcc/optabs.cc:8220
0x15a15e7 expand_binop_directly
        /repo/gcc-trunk/gcc/optabs.cc:1457
0x159f2f1 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*,
int, optab_methods)
        /repo/gcc-trunk/gcc/optabs.cc:1544
0x12d32e6 force_operand(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:8661
0x12a1909 memory_address_addr_space(machine_mode, rtx_def*, unsigned char)
        /repo/gcc-trunk/gcc/explow.cc:509
0x128330a change_address_1
        /repo/gcc-trunk/gcc/emit-rtl.cc:2301
0x133ef98 assign_parm_setup_stack
        /repo/gcc-trunk/gcc/function.cc:3534
0x1343d94 assign_parms
        /repo/gcc-trunk/gcc/function.cc:3729
0x13460ff expand_function_start(tree_node*)
        /repo/gcc-trunk/gcc/function.cc:5152
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-r14-8874-20240208013446-gbfd72bb44ec-checking-yes-rtl-df-extra-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/14.0.1/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
--with-cloog --with-ppl --with-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
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-8874-20240208013446-gbfd72bb44ec-checking-yes-rtl-df-extra-riscv64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240208 (experimental) (GCC)

Reply via email to