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

            Bug ID: 126232
           Summary: [17 Regression] ICE: in maybe_legitimize_operand, at
                    optabs.cc:8427 with -O3 -fvect-cost-model=unlimited
                    --param=vect-partial-vector-usage=2 -mavx10.1
           Product: gcc
           Version: 17.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: x86_64-pc-linux-gnu

Created attachment 65022
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65022&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O3 -fvect-cost-model=unlimited
--param=vect-partial-vector-usage=2 -mavx10.1 testcase.cduring RTL pass: expand
testcase.c: In function 'foo':
testcase.c:5:1: internal compiler error: in maybe_legitimize_operand, at
optabs.cc:8427
    5 | foo ()
      | ^~~
0x2e56e3d internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xe45d49 fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostics/context.cc:1813
0x875ad7 maybe_legitimize_operand
        /repo/gcc-trunk/gcc/optabs.cc:8427
0x875ad7 maybe_legitimize_operands(insn_code, unsigned int, unsigned int,
expand_operand*)
        /repo/gcc-trunk/gcc/optabs.cc:8576
0x14bf537 emit_cmp_and_jump_insns(rtx_def*, rtx_def*, rtx_code, rtx_def*,
machine_mode, int, tree_node*, rtx_def*, profile_probability)
        /repo/gcc-trunk/gcc/optabs.cc:5140
0x10b389c do_compare_rtx_and_jump(rtx_def*, rtx_def*, rtx_code, int,
tree_node*, machine_mode, rtx_def*, rtx_code_label*, rtx_code_label*,
profile_probability)
        /repo/gcc-trunk/gcc/dojump.cc:1255
0x10b4ff5 do_jump
        /repo/gcc-trunk/gcc/dojump.cc:620
0x10b6387 do_jump_1
        /repo/gcc-trunk/gcc/dojump.cc:213
0x102bca4 expand_gimple_cond
        /repo/gcc-trunk/gcc/cfgexpand.cc:3006
0x1031b3b expand_gimple_basic_block
        /repo/gcc-trunk/gcc/cfgexpand.cc:6358
0x1033e77 execute
        /repo/gcc-trunk/gcc/cfgexpand.cc:7255
/repo/gcc-trunk/binary-trunk-20260713054658-g6df03d626ff-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260713054658-g6df03d626ff-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c -mavx10.1
-mtune=generic -march=x86-64 -O3 -fvect-cost-model=unlimited
--param=vect-partial-vector-usage=2 -o /tmp/ccacueJE.s
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20260713054658-g6df03d626ff-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20260713054658-g6df03d626ff-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260713 (experimental) (GCC)

Reply via email to