This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add AVX512 k-mask intrinsics
- From: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- To: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Uros Bizjak <ubizjak at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 17 Jan 2017 04:30:06 -0800
- Subject: Re: [PATCH] Add AVX512 k-mask intrinsics
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4Zj1Fj0HUSEC_V71Vnutmw0=OU5HSKJFeOCdAY1rWn++g@mail.gmail.com> <CAMXFM3v5V+XeG1a7YgBLUUo6BS6h6SPRqkhphk2w4o+nKtP-vA@mail.gmail.com> <CAFULd4YOmYoYV4ChYPPB0d3L5MyJOBUdfQRLb1f2hC973iLz0g@mail.gmail.com> <CAMXFM3vC-3bMgQaQ2bnjDU7oQMPdvhurzgOFftZHqzNXAw=WgA@mail.gmail.com> <CAFULd4bp_e_oet-H-QDfOymudOWLR=TRhs3q+oP4o9d3DdotMQ@mail.gmail.com> <CAMXFM3u61pLCrWKFzGQL=Rn+rwzKh8iU4ZSZHj_nUEAM3-2BiQ@mail.gmail.com> <CAFULd4Z16_wQvOMLQPRxQjyom7fMHnaYabwXqcaezrp1in8gyg@mail.gmail.com> <CAMXFM3sCm43CE+N+Nf39RaytCz1Uc=XBKa=o8qd0DkL=_sfCnw@mail.gmail.com> <20170116225500.GT1867@tucnak> <CAMXFM3uiLynWanig52BfJa47qdKwffdYgqHfnC7yT4bJrsiO5A@mail.gmail.com>
Hi Anrey,
On 17 Jan 14:04, Andrew Senkevich wrote:
> 2017-01-17 1:55 GMT+03:00 Jakub Jelinek <jakub@redhat.com>:
> > On Tue, Jan 17, 2017 at 01:30:11AM +0300, Andrew Senkevich wrote:
> >> here is one more part of intrinsics for k-mask registers shifts:
> >
> > The software developer manuals describe KSHIFT{L,R}* like:
> > KSHIFTLW
> > COUNT <- imm8[7:0]
> > DEST[MAX_KL-1:0] <- 0
> > IF COUNT <=15
> > THEN DEST[15:0] <- SRC1[15:0] << COUNT;
> > FI;
> >
> > What is the behavior when src1 == dest, like:
> > kshiftld $3, %k3, %k3
> > ? Is it just a bug in the SDM and will it actually do the expected thing
> > (set %k3 to %k3 << 3 and clear just the upper bits), or do we need
> > an early-clobber on the destination to make sure GCC never emits these
> > insns with the same register as both input and output?
>
> Indeed, it should be different registers, how to do it?
Are you sure?
I've played a bit w/ SDE. And looks like operands are not early clobber:
TID0: INS 0x00000000004003ee AVX512VEX kmovd k0, eax
TID0: k0 := 00000000_ffffffff
...
TID0: INS 0x00000000004003f4 AVX512VEX kshiftlw k0, k0, 0x3
TID0: k0 := 00000000_0000fff8
You can see that same dest and source works just fine.
--
Thanks, K
>
>
> --
> WBR,
> Andrew