Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Intel compiler doesn't support '__builtin_shuffle'

applemax82
Beginner
950 Views

Hi,

I failed to build freetype-2.9.1, harfbuzz-1.7.6 and libpng-1.6.34 using 'icc (ICC) 18.0.1 20171018'

The following is my building steps for your reference:

cd libpng-1.6.34 && ./autogen.sh && ./configure --prefix=/usr/local/ --enable-shared && make && make install

cd freetype-2.9.1 && ./configure --prefix=/usr/local/ --enable-shared --with-png=no --with-harfbuzz=no && make && make install

cd harfbuzz-1.7.6 && ./configure CXXFLAGS="-fPIC" --prefix=/usr/local/ --enable-shared --with-freetype=yes && make && make install

cd freetype-2.9.1 && make clean && make distclean && ./configure --prefix=/usr/local/ --enable-shared --with-png=yes --with-harfbuzz=yes && make  && make install

But Intel compiler reported error as shown below:

libtool: compile:  icc -pedantic -ansi -I/home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/src/cid -I/home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/objs -I./builds/unix -I/home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/include -I/opt/intel/include -c -Wall -std=gnu99 -O3 -ip -restrict -xSSE3 -axSSE3,SSSE3,SSE4.1,SSE4.2 -fvisibility=hidden -I/usr/local/include/libpng16 -I/usr/local/include/harfbuzz "-DFT_CONFIG_CONFIG_H=<ftconfig.h>" -DFT2_BUILD_LIBRARY "-DFT_CONFIG_MODULES_H=<ftmodule.h>" "-DFT_CONFIG_OPTIONS_H=<ftoption.h>" /home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/src/cid/type1cid.c -o /home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/objs/type1cid.o >/dev/null 2>&1
In file included from /home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/src/sfnt/sfnt.c(22):
/home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/src/sfnt/pngshim.c(110): error: "__builtin_shuffle" is not supported
          a   = vector_shuffle( s1, ma );       /*  A A  A A  A A  A A */
                ^
 
In file included from /home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/src/sfnt/sfnt.c(22):
/home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/src/sfnt/pngshim.c(112): error: "__builtin_shuffle" is not supported
          s0  = vector_shuffle( s0, m0 );       /*  B R  B R  B R  B R */
                ^
 
/home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/src/type1/t1load.c(585): (col. 3) remark: T1_Set_Var_Design has been targeted for automatic cpu dispatch
libtool: compile:  icc -pedantic -ansi -I/home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/src/autofit -I/home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/objs -I./builds/unix -I/home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/include -I/opt/intel/include -c -Wall -std=gnu99 -O3 -ip -restrict -xSSE3 -axSSE3,SSSE3,SSE4.1,SSE4.2 -fvisibility=hidden -I/usr/local/include/libpng16 -I/usr/local/include/harfbuzz "-DFT_CONFIG_CONFIG_H=<ftconfig.h>" -DFT2_BUILD_LIBRARY "-DFT_CONFIG_MODULES_H=<ftmodule.h>" "-DFT_CONFIG_OPTIONS_H=<ftoption.h>" /home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/src/autofit/autofit.c  -fPIC -DPIC -o /home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/objs/.libs/autofit.o
compilation aborted for /home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/src/sfnt/sfnt.c (code 2)
make: *** [/home/jd-test/work/updateIntelFFmpeg/jdcloud-vod-ffmpeg/freetype-2.9.1/objs/sfnt.lo] Error 1
make: *** Waiting for unfinished jobs....

 

Does Intel compiler 2019 support '__builtin_shuffle'? Will Intel compiler support '__builtin_shuffle'?

Thanks!

Regards

Andrew

 

 

0 Kudos
6 Replies
Viet_H_Intel
Moderator
950 Views

Hi Andrew,

I don't see it yet supports in 2019, but have checked with our developer. I will keep you posted.

Thanks,

Viet

 

0 Kudos
pDs
Beginner
950 Views

Hi Viet,

Any updates on this topic?

Regards,
Pranav

0 Kudos
Viet_H_Intel
Moderator
950 Views

I don't have any update yet.

Thanks,

0 Kudos
Hanousek__Petr
Beginner
950 Views

And what now? :)

Thank you, Petr

0 Kudos
Viet_H_Intel
Moderator
950 Views

I dont see it's supported in latest ICC (ICC19.0.5) and also noticed that clang doesn't support __builtin_shuffle either

$ clang t.c -c
t.c:10:11: error: use of unknown builtin '__builtin_shuffle' [-Wimplicit-function-declaration]
     v2 = __builtin_shuffle (v, v1);

@orcsle147:/tmp$ cat t.c
#include <stdio.h>

typedef int myvec __attribute__ ((vector_size (16)));

int foo(void) {
     myvec v = {1,2,3,4};
     myvec v1 = {0,1,1,3};
     myvec v2;

     v2 = __builtin_shuffle (v, v1);
     return 0;
}
 

0 Kudos
jimdempseyatthecove
Honored Contributor III
950 Views

What is(are) the types for s0 and s1?

Note, you have specified: -xSSE3 -axSSE3,SSSE3,SSE4.1,SSE4.2

This will restrict you to the 64-bit and 128-bit small vectors.

In the case that you are using 128-bit small vectors, then you could use the emmintrin/xmmintrin intrinsics by way of #define

If you are attempting to use 256-bit vectors, then you haven't specified the AVX instruction set. Note, it is usually counter-productive to specify so many alternate paths.

Jim Dempsey

0 Kudos
Reply