2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr81481.c
bloba5b936fdacc17a66610ad5edc09cbee8acb7d1f7
1 /* { dg-do compile } */
2 /* { dg-require-effective-target ssse3 } */
3 /* { dg-options "-O2 -fpic -mssse3" } */
4 /* { dg-final { scan-assembler-not "pshufb\[ \t\]\\(%esp\\)" } } */
5 #include <immintrin.h>
7 extern const signed char c[31] __attribute__((visibility("hidden")));
9 __m128i f(__m128i *x, void *v)
11 int i;
12 asm("# %0" : "=r"(i));
13 __m128i t = _mm_loadu_si128((void*)&c[i]);
14 __m128i xx = *x;
15 xx = _mm_shuffle_epi8(xx, t);
16 asm("# %0 %1 %2" : "+x"(xx) : "r"(c), "r"(i));
17 return xx;