Re: [PATCH] i386: avoid zero extension for crc32q

2022-09-04 Thread Uros Bizjak via Gcc-patches
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

Re: [PATCH] i386: avoid zero extension for crc32q

2022-08-24 Thread Alexander Monakov via Gcc-patches
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" } } */

[PATCH] i386: avoid zero extension for crc32q

2022-08-23 Thread Alexander Monakov via Gcc-patches
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