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