aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512vl-concatv4si-1.c
blob: 88d4682278c2c9061faca94954363d566edcdcaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile { target { ! ia32 } } } */
/* { dg-options "-O2 -mavx512vl" } */

typedef int V __attribute__((vector_size (8)));
typedef int W __attribute__((vector_size (16)));

void
f1 (V x, V y)
{
  register W c __asm ("xmm16");
  c = (W) { x[0], x[1], x[0], x[1] };
  asm volatile ("" : "+v" (c));
}

void
f2 (V x, V *y)
{
  register W c __asm ("xmm16");
  c = (W) { x[0], x[1], (*y)[0], (*y)[1] };
  asm volatile ("" : "+v" (c));
}

/* { dg-final { scan-assembler-times "vpunpcklqdq\[^\n\r]*xmm16" 2 } } */