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)));
12 register v16qi c
__asm ("xmm16") = a
;
13 register unsigned char e
__asm ("dl");
14 asm volatile ("" : "+v" (c
));
16 e
= ((unsigned char *) &d
)[3];
17 asm volatile ("" : : "q" (e
));
23 register v8hi c
__asm ("xmm16") = a
;
24 register unsigned short e
__asm ("dx");
25 asm volatile ("" : "+v" (c
));
27 e
= ((unsigned short *) &d
)[3];
28 asm volatile ("" : : "r" (e
));
34 register v16qi c
__asm ("xmm16") = a
;
35 asm volatile ("" : "+v" (c
));
37 return ((unsigned char *) &d
)[3];
43 register v8hi c
__asm ("xmm16") = a
;
44 asm volatile ("" : "+v" (c
));
46 return ((unsigned short *) &d
)[3];
52 register v16qi c
__asm ("xmm16") = a
;
53 asm volatile ("" : "+v" (c
));
55 return ((unsigned char *) &d
)[3];
61 register v8hi c
__asm ("xmm16") = a
;
62 asm volatile ("" : "+v" (c
));
64 return ((unsigned short *) &d
)[3];
68 f7 (v16qi a
, unsigned char *p
)
70 register v16qi c
__asm ("xmm16") = a
;
71 asm volatile ("" : "+v" (c
));
73 *p
= ((unsigned char *) &d
)[3];
77 f8 (v8hi a
, unsigned short *p
)
79 register v8hi c
__asm ("xmm16") = a
;
80 asm volatile ("" : "+v" (c
));
82 *p
= ((unsigned short *) &d
)[3];
88 register v4si c
__asm ("xmm16") = a
;
89 register unsigned int e
__asm ("xmm17");
90 asm volatile ("" : "+v" (c
));
92 e
= ((unsigned int *) &d
)[3];
93 asm volatile ("" : "+v" (e
));
99 register v2di c
__asm ("xmm16") = a
;
100 register unsigned long long e
__asm ("xmm17");
101 asm volatile ("" : "+v" (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 } } */