PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512vl-vinserti32x4-3.c
blob45b0122e925e8b0d417a436e7a31156224126893
1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -mavx512vl -masm=att" } */
4 typedef char V1 __attribute__((vector_size (32)));
5 typedef short V2 __attribute__((vector_size (32)));
7 void
8 f1 (V1 x, char y)
10 register V1 a __asm ("xmm16");
11 a = x;
12 asm volatile ("" : "+v" (a));
13 a[7] = y;
14 asm volatile ("" : "+v" (a));
17 void
18 f2 (V1 x, char y)
20 register V1 a __asm ("xmm16");
21 a = x;
22 asm volatile ("" : "+v" (a));
23 a[28] = y;
24 asm volatile ("" : "+v" (a));
27 void
28 f3 (V2 x, short y)
30 register V2 a __asm ("xmm16");
31 a = x;
32 asm volatile ("" : "+v" (a));
33 a[3] = y;
34 asm volatile ("" : "+v" (a));
37 void
38 f4 (V2 x, short y)
40 register V2 a __asm ("xmm16");
41 a = x;
42 asm volatile ("" : "+v" (a));
43 a[14] = y;
44 asm volatile ("" : "+v" (a));
47 /* { dg-final { scan-assembler-times "vinserti32x4\[^\n\r]*0x0\[^\n\r]*%ymm16" 2 } } */
48 /* { dg-final { scan-assembler-times "vinserti32x4\[^\n\r]*0x1\[^\n\r]*%ymm16" 2 } } */
49 /* { dg-final { scan-assembler-times "vextracti32x4\[^\n\r]*0x1\[^\n\r]*%\[yz]mm16" 2 } } */