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

            Bug ID: 121160
           Summary: RISC-V: ICE in 538.imagick with -O3 -ffast-math
           Product: gcc
           Version: 15.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: parras at gcc dot gnu.org
  Target Milestone: ---

This is likely a recent regression but I have not found the culprit commit yet.
Seems to have to do with conditional move...

$ riscv64-unknown-linux-gnu-gcc -std=c99 -mabi=lp64d -c -DSPEC
-march=rv64gcv_zvl256b_zba_zbb_zbs_zicond -mrvv-vector-bits=zvl -O3 -ffast-math
  magick/quantum-import.c

during RTL pass: ce2
In function 'ImportRGBAQuantum':
quantum-import.c:3365:1: internal compiler error: in emit_move_insn, at
expr.cc:4631
 3365 | }
      | ^
0x2fe07bf internal_error(char const*, ...)
        ../../../src/gcc/gcc/diagnostic-global-context.cc:517
0xdd87c1 fancy_abort(char const*, int, char const*)
        ../../../src/gcc/gcc/diagnostic.cc:1818
0xbab55c emit_move_insn(rtx_def*, rtx_def*)
        ../../../src/gcc/gcc/expr.cc:4631
0x10fd99f force_reg(machine_mode, rtx_def*)
        ../../../src/gcc/gcc/explow.cc:693
0x1a58cfd riscv_expand_conditional_move(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
        ../../../src/gcc/gcc/config/riscv/riscv.cc:5565
0x24e9df3 gen_movdicc(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
        ../../../src/gcc/gcc/config/riscv/riscv.md:3303
0x145fa36 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
        ../../../src/gcc/gcc/optabs.cc:8257
0x145fa36 emit_conditional_move_1
        ../../../src/gcc/gcc/optabs.cc:5190
0x145fe70 emit_conditional_move(rtx_def*, rtx_comparison, rtx_def*, rtx_def*,
machine_mode, int)
        ../../../src/gcc/gcc/optabs.cc:5103
0x2d517cb noce_emit_cmove
        ../../../src/gcc/gcc/ifcvt.cc:1777
0x2d55e15 noce_try_cmove_arith
        ../../../src/gcc/gcc/ifcvt.cc:2363
0x2d5dd13 noce_process_if_block
        ../../../src/gcc/gcc/ifcvt.cc:4254
0x2d5dd13 noce_find_if_block
        ../../../src/gcc/gcc/ifcvt.cc:4726
0x2d5dd13 find_if_header
        ../../../src/gcc/gcc/ifcvt.cc:4931
0x2d5dd13 if_convert
        ../../../src/gcc/gcc/ifcvt.cc:6078
0x2d5e29d execute
        ../../../src/gcc/gcc/ifcvt.cc:6231

Reply via email to