https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106453
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-07-28
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Alexander Monakov from comment #1)
> 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")
It looks good.