1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -mavx512vl -mno-avx512dq -masm=att" } */
3
4 typedef int V __attribute__((vector_size (8)));
5
6 void
f1(int x,int y)7 f1 (int x, int y)
8 {
9 register int a __asm ("xmm16");
10 register int b __asm ("xmm17");
11 register V c __asm ("xmm3");
12 a = x;
13 b = y;
14 asm volatile ("" : "+v" (a), "+v" (b));
15 c = (V) { a, b };
16 asm volatile ("" : "+v" (c));
17 }
18
19 /* { dg-final { scan-assembler "vpunpckldq\[^\n\r]*%xmm17\[^\n\r]*%xmm16\[^\n\r]*%xmm3" } } */
20
21 void
f2(int x,int y)22 f2 (int x, int y)
23 {
24 register int a __asm ("xmm16");
25 register V c __asm ("xmm3");
26 a = x;
27 asm volatile ("" : "+v" (a));
28 c = (V) { a, y };
29 asm volatile ("" : "+v" (c));
30 }
31
32 void
f3(int x,int * y)33 f3 (int x, int *y)
34 {
35 register int a __asm ("xmm16");
36 register V c __asm ("xmm3");
37 a = x;
38 asm volatile ("" : "+v" (a));
39 c = (V) { a, *y };
40 asm volatile ("" : "+v" (c));
41 }
42
43 /* { dg-final { scan-assembler-not "vpinsrd\[^\n\r]*\\\$1\[^\n\r]*%xmm16\[^\n\r]*%xmm3" } } */
44