On Tue, Aug 23, 2022 at 6:10 PM Alexander Monakov via Gcc-patches
wrote:
>
> The crc32q instruction takes 64-bit operands, but ignores high 32 bits
> of the destination operand, and zero-extends the result from 32 bits.
>
> Let's model this in the RTL pattern to avoid zero-extension when the
> _mm
On Tue, 23 Aug 2022, Alexander Monakov via Gcc-patches wrote:
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/i386/pr106453.c
> @@ -0,0 +1,13 @@
> +/* { dg-do compile } */
> +/* { dg-options "-msse4.2 -O2 -fdump-rtl-final" } */
> +/* { dg-final { scan-rtl-dump-not "zero_extendsidi" "final" } } */
The crc32q instruction takes 64-bit operands, but ignores high 32 bits
of the destination operand, and zero-extends the result from 32 bits.
Let's model this in the RTL pattern to avoid zero-extension when the
_mm_crc32_u64 intrinsic is used with a 32-bit type.
PR target/106453
gcc/Chang