c++: Fix ICE on constexpr virtual function [PR117317]
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512bw-vpextr-1.c
blobf4eea9bf5115365d4e71767e4d300cded8430bdc
1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -mavx512vl -mavx512bw" } */
4 typedef char v16qi __attribute__((vector_size (16)));
5 typedef short v8hi __attribute__((vector_size (16)));
6 typedef int v4si __attribute__((vector_size (16)));
7 typedef long long v2di __attribute__((vector_size (16)));
9 void
10 f1 (v16qi a)
12 register v16qi c __asm ("xmm16") = a;
13 register unsigned char e __asm ("dl");
14 asm volatile ("" : "+v" (c));
15 v16qi d = c;
16 e = ((unsigned char *) &d)[3];
17 asm volatile ("" : : "q" (e));
20 unsigned short
21 f2 (v8hi a)
23 register v8hi c __asm ("xmm16") = a;
24 register unsigned short e __asm ("dx");
25 asm volatile ("" : "+v" (c));
26 v8hi d = c;
27 e = ((unsigned short *) &d)[3];
28 asm volatile ("" : : "r" (e));
31 unsigned int
32 f3 (v16qi a)
34 register v16qi c __asm ("xmm16") = a;
35 asm volatile ("" : "+v" (c));
36 v16qi d = c;
37 return ((unsigned char *) &d)[3];
40 unsigned int
41 f4 (v8hi a)
43 register v8hi c __asm ("xmm16") = a;
44 asm volatile ("" : "+v" (c));
45 v8hi d = c;
46 return ((unsigned short *) &d)[3];
49 unsigned long long
50 f5 (v16qi a)
52 register v16qi c __asm ("xmm16") = a;
53 asm volatile ("" : "+v" (c));
54 v16qi d = c;
55 return ((unsigned char *) &d)[3];
58 unsigned long long
59 f6 (v8hi a)
61 register v8hi c __asm ("xmm16") = a;
62 asm volatile ("" : "+v" (c));
63 v8hi d = c;
64 return ((unsigned short *) &d)[3];
67 void
68 f7 (v16qi a, unsigned char *p)
70 register v16qi c __asm ("xmm16") = a;
71 asm volatile ("" : "+v" (c));
72 v16qi d = c;
73 *p = ((unsigned char *) &d)[3];
76 void
77 f8 (v8hi a, unsigned short *p)
79 register v8hi c __asm ("xmm16") = a;
80 asm volatile ("" : "+v" (c));
81 v8hi d = c;
82 *p = ((unsigned short *) &d)[3];
85 void
86 f9 (v4si a)
88 register v4si c __asm ("xmm16") = a;
89 register unsigned int e __asm ("xmm17");
90 asm volatile ("" : "+v" (c));
91 v4si d = c;
92 e = ((unsigned int *) &d)[3];
93 asm volatile ("" : "+v" (e));
96 void
97 f10 (v2di a)
99 register v2di c __asm ("xmm16") = a;
100 register unsigned long long e __asm ("xmm17");
101 asm volatile ("" : "+v" (c));
102 v2di d = c;
103 e = ((unsigned long long *) &d)[1];
104 asm volatile ("" : "+v" (e));
107 /* { dg-final { scan-assembler-times "vpextrb\[^\n\r]*xmm16" 4 } } */
108 /* { dg-final { scan-assembler-times "vpextrw\[^\n\r]*xmm16" 4 } } */
109 /* { dg-final { scan-assembler-times "vpsrldq\[^\n\r]*xmm1\[67\]\[^\n\r]*xmm1\[67\]" 2 } } */