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