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: Thu, 19 Jan 2017 02:39:00 -0800
- Subject: Re: [PATCH] Add AVX512 k-mask intrinsics
- Authentication-results: sourceware.org; auth=none
- References: <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> <20170117123005.GA16946@ubuntu> <CAMXFM3sta7549Vwq-n_B_iuaHxS_XGCKHHaHsMgcwWXAmrC8zQ@mail.gmail.com> <20170117135102.GY1867@tucnak> <CAMXFM3sOT+QWaH==NPo8h4SCiYk82fO9bibN+5G1B4Etp6_h1w@mail.gmail.com>
Hi Andrew,
On 18 Jan 15:45, Andrew Senkevich wrote:
> 2017-01-17 16:51 GMT+03:00 Jakub Jelinek <jakub@redhat.com>:
> > On Tue, Jan 17, 2017 at 04:03:08PM +0300, Andrew Senkevich wrote:
> >> > 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.
> >>
> >> Hmm, I looked only on what ICC generates, and it was not correct way.
> >
> > I've just tried
> > int
> > main ()
> > {
> > unsigned int a = 0x5555;
> > asm volatile ("kmovw %1, %%k6; kshiftlw $1, %%k6, %%k6; kmovw %%k6, %0" : "=r" (a) : "r" (a) : "k6");
> > __builtin_printf ("%x\n", a);
> > return 0;
> > }
> > on KNL and got 0xaaaa.
> > Are you going to report to the SDM authors so that they fix it up?
> > E.g. using TEMP <- SRC1[0:...] before DEST[...] <- 0 and using TEMP
> > instead of SRC1[0:...] would fix it, or filling up TEMP first and only
> > at the end assigning DEST <- TEMP etc. would do.
>
> Yes, we will work on it.
>
> Attached patch refactored in part of builtints declarations and tests, is it Ok?
Could you please add runtime tests for new intrinsics as well?
--
Thanks, K
> --
> WBR,
> Andrew