This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Idea: extend gcc to save C from the hell of intel vector instructions
- From: Warren D Smith <warren dot wds at gmail dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 20 Feb 2019 12:16:17 -0500
- Subject: Re: Idea: extend gcc to save C from the hell of intel vector instructions
- References: <CAAJP7Y2H7RMrmm6Q9PxPzp7y92WpdzPdvUVB4uOWP+f3aBu=-Q@mail.gmail.com> <CA+=Sn1=XU98vkQSqoL30LgdE_k=OKO=N635McUBcnBBYRzZOQQ@mail.gmail.com>
On 2/18/19, Andrew Pinski <pinskia@gmail.com> wrote:
> GCC already has most of this support. See
> https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/Vector-Extensions.html#Vector-Extensions
>
> The dot in the typenames are not going to supported though.
>
> Thanks,
> Andrew
--what #include files and/or compiler flags are needed to enable this stuff?
(Be nice if that doc page said.)
My gcc allows me to use, e.g.
c = _mm_shuffle_epi8(a, b);
(and my code worked!) provided I have done
#include <tmmintrin.h>
#include <immintrin.h>
but if I try to replace that with the nicer (since more portable)
c = __builtin_shuffle(a, b);
then
error: use of unknown builtin '__builtin_shuffle'
[-Wimplicit-function-declaration]
--
Warren D. Smith
http://RangeVoting.org <-- add your endorsement (by clicking
"endorse" as 1st step)