1 /* PR target/45336 */
2 /* { dg-do compile { target { ! ia32 } } } */
3 /* { dg-options "-O2 -msse4 -mtune=generic" } */
4 /* { dg-final { scan-assembler "movsbq" } } */
5 /* { dg-final { scan-assembler "movswq" } } */
6 /* { dg-final { scan-assembler "(cltq|movslq)" } } */
7 /* { dg-final { scan-assembler "pextrb" } } */
8 /* { dg-final { scan-assembler "pextrw" } } */
9 /* { dg-final { scan-assembler "pextrd" { target { ! x86_64-*-mingw* } } } } */
10 
11 #include <smmintrin.h>
foo8(__m128i x)12 long long int foo8(__m128i x) { return (char) _mm_extract_epi8(x, 4); }
foo16(__m128i x)13 long long int foo16(__m128i x) { return (short) _mm_extract_epi16(x, 3); }
foo32(__m128i x)14 long long int foo32(__m128i x) { return (int) _mm_extract_epi32(x, 2); }
15