[Bug target/122991] [16 Regression] ICE: RTL check: expected code 'const_int', have 'reg' in gen_crc_revsisi4, at config/i386/i386.md:29718 with -msse4 and __builtin_rev_crc32_data32()
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 3 22:14:38 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122991
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r16-1706-gf8f7ace4f20829f2fad87662f5163c9b13427e39 but I think it
is a bug on several targets.
The problem is that when the last argument (i.e. the polynomial) is equal to
some earlier argument and that earlier argument is forced into a register (e.g.
through register_operand or nonimmediate_operand predicate), then
maybe_expand_insn will use that register as the last argument too if it
satisfies the last argument predicate.
And, the crc_optab and crc_rev_optab patterns on all targets use no predicate
for the last argument and still expect it is a CONST_INT.
So, we need to use "const_int_operand" predicate I think.
More information about the Gcc-bugs
mailing list