This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Allan Sandfeld Jensen <linux at carewolf dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Uros Bizjak <ubizjak at gmail dot com>
- Date: Mon, 24 Apr 2017 10:40:14 +0200
- Subject: Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C8CA246D096
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C8CA246D096
- References: <201704221338.46300.linux@carewolf.com> <201704241002.40719.linux@carewolf.com> <20170424082553.GJ1809@tucnak> <201704241034.58649.linux@carewolf.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Apr 24, 2017 at 10:34:58AM +0200, Allan Sandfeld Jensen wrote:
> That is a different instruction. That is the vpsllw not vpsllwi
>
> The intrinsics I changed is the immediate version, I didn't change the non-
> immediate version. It is probably a bug if you can give non-immediate values
> to the immediate only intrinsic. At least both versions handles it, if in
> different ways, but is is illegal arguments.
The documentation is unclear on that and I've only recently fixed up some
cases where these intrinsics weren't able to handle non-constant arguments
in some cases, while both ICC and clang coped with that fine.
So it is clearly allowed and handled by all the compilers and needs to be
supported, people use that in real-world code.
Jakub