summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr32661.c
blob: 247ae1319237ae28166ce2eadb65518aac4d16e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* { dg-do compile } */
/* { dg-options "-O2 -msse2" } */

typedef int __v4si __attribute__ ((__vector_size__ (16)));
typedef float __v4sf __attribute__ ((__vector_size__ (16)));

int fooSI_1(__v4si *val)
{
  return __builtin_ia32_vec_ext_v4si(*val, 1);
}
/* { dg-final { scan-assembler-not "pshufd" } } */

int fooSI_2(__v4si *val)
{
  return __builtin_ia32_vec_ext_v4si(*val, 2);
}
/* { dg-final { scan-assembler-not "punpckhdq" } } */

float fooSF_2(__v4sf *val)
{
  return __builtin_ia32_vec_ext_v4sf(*val, 2);
}
/* { dg-final { scan-assembler-not "unpckhps" } } */

float fooSF_3(__v4sf *val)
{
  return __builtin_ia32_vec_ext_v4sf(*val, 3);
}
/* { dg-final { scan-assembler-not "shufps" } } */