https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121716
Bug ID: 121716 Summary: [16 Regression] ICE: RTL check: expected code 'const_int', have 'reg' in ix86_vgf2p8affine_shift_matrix, at config/i386/i386-expand.cc:27107 with -march=graniterapids-d Product: gcc Version: 16.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 62227 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62227&action=edit reduced testcase This might need RTL checking enabled. Compiler output: $ x86_64-pc-linux-gnu-gcc -O1 -march=graniterapids-d testcase.c during RTL pass: expand testcase.c: In function 'foo': testcase.c:8:6: internal compiler error: RTL check: expected code 'const_int', have 'reg' in ix86_vgf2p8affine_shift_matrix, at config/i386/i386-expand.cc:27107 8 | v = (V){} >= a | (V){1} << b; | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~ 0x2b96291 internal_error(char const*, ...) /repo/gcc-trunk/gcc/diagnostic-global-context.cc:534 0x8805a6 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int, char const*) /repo/gcc-trunk/gcc/rtl.cc:770 0x9699d8 ix86_vgf2p8affine_shift_matrix(rtx_def*, rtx_def*, rtx_code) /repo/gcc-trunk/gcc/config/i386/i386-expand.cc:27107 0x2330fc0 gen_cond_ashlv16qi(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/config/i386/sse.md:27015 0x144fbd8 maybe_expand_insn(insn_code, unsigned int, expand_operand*) /repo/gcc-trunk/gcc/optabs.cc:8257 0x144fbd8 expand_insn(insn_code, unsigned int, expand_operand*) /repo/gcc-trunk/gcc/optabs.cc:8288 0x129fb42 expand_fn_using_insn /repo/gcc-trunk/gcc/internal-fn.cc:318 0x112a370 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /repo/gcc-trunk/gcc/expr.cc:11443 0x113525d store_expr(tree_node*, rtx_def*, int, bool, bool) /repo/gcc-trunk/gcc/expr.cc:6766 0x1137e4f expand_assignment(tree_node*, tree_node*, bool) /repo/gcc-trunk/gcc/expr.cc:6487 0x1137e4f expand_assignment(tree_node*, tree_node*, bool) /repo/gcc-trunk/gcc/expr.cc:5975 0xfe6b80 expand_gimple_stmt_1 /repo/gcc-trunk/gcc/cfgexpand.cc:4301 0xfe6b80 expand_gimple_stmt /repo/gcc-trunk/gcc/cfgexpand.cc:4382 0xfe8d07 expand_gimple_basic_block /repo/gcc-trunk/gcc/cfgexpand.cc:6501 0xfeb107 execute /repo/gcc-trunk/gcc/cfgexpand.cc:7248 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-20250829043019-r16-3452-g2cb3fb032de455-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.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-20250829043019-r16-3452-g2cb3fb032de455-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 16.0.0 20250829 (experimental) (GCC)