https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106453
--- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> --- Any idea if the following is reasonable? It compiles and achieves the desired result. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index bdde577dd..d82656678 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -23598,10 +23598,10 @@ (define_insn "sse4_2_crc32di" [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI - [(match_operand:DI 1 "register_operand" "0") + (zero_extend:DI (unspec:SI + [(match_operand:SI 1 "register_operand" "0") (match_operand:DI 2 "nonimmediate_operand" "rm")] - UNSPEC_CRC32))] + UNSPEC_CRC32)))] "TARGET_64BIT && TARGET_CRC32" "crc32{q}\t{%2, %0|%0, %2}" [(set_attr "type" "sselog1")