2 /* { dg-do compile } */
3 /* { dg-require-effective-target lp64 } */
4 /* { dg-options "-O2 -msse4 -mtune=generic" } */
5 /* { dg-final { scan-assembler-not "movsbl" } } */
6 /* { dg-final { scan-assembler-not "movswl" } } */
7 /* { dg-final { scan-assembler-not "movzbl" } } */
8 /* { dg-final { scan-assembler-not "movzwl" } } */
9 /* { dg-final { scan-assembler-not "cwtl" } } */
10 /* { dg-final { scan-assembler-not "cltq" } } */
11 /* { dg-final { scan-assembler "pextrb" } } */
12 /* { dg-final { scan-assembler "pextrw" } } */
13 /* { dg-final { scan-assembler "pextrd" } } */
15 #include <smmintrin.h>
16 unsigned long long int foo8(__m128i x
) { return _mm_extract_epi8(x
, 4); }
17 unsigned long long int foo16(__m128i x
) { return _mm_extract_epi16(x
, 3); }
18 unsigned long long int foo32(__m128i x
)
20 return (unsigned int) _mm_extract_epi32(x
, 2);