This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386] Avoid fixed 512-bit vector size in constant set for Intel AVX512 configuration


On Thu, Sep 21, 2017 at 3:41 PM, Shalnov, Sergey
<sergey.shalnov@intel.com> wrote:
> Hi,
> GCC uses full 512-bit register to keep the constant. This constant uses in the code further but with 128-bit vector length.
> The patch avoid fixed large vector length usage.
>
> For the simple code:
> void my_test(short *table)
> {
>   for (int i = 0; i < 128; ++i) {
>     table[i] = -1;
>   }
> }
>
> It generates:
>   vpternlogd $0xFF, %zmm0, %zmm0, %zmm0
>   vmovups %xmm0, (%rdi)
>   vmovups %xmm0, 16(%rdi)
>   vmovups %xmm0, 32(%rdi)
> ...etc..
>
> The patched GCC generates:
>   vpcmpeqd %xmm0,%xmm0,%xmm0
>   vmovups %xmm0,(%rdi)
>   vmovups %xmm0,0x10(%rdi)
>   vmovups %xmm0,0x20(%rdi)
> ...etc..
>
>
> gcc/ChangeLog:
>
> 2017-09-21  Sergey Shalnov  <Sergey.Shalnov@intel.com>
>
>         * config/i386/sse.md: The vector legister length should be the same
>         as it used. Avoid the largest fixed vector length.
>
> gcc/testsuite/ChangeLog:
>
> 2017-09-21  Sergey Shalnov  <Sergey.Shalnov@intel.com>
>
>         * gcc.target/i386/avx512f-constant-set.c: New test.

The patch is OK. The ChangeLog is not.

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]