1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -mavx512vl -mavx512dq" } */
4 typedef int v4si
__attribute__((vector_size (16)));
5 typedef long long v2di
__attribute__((vector_size (16)));
10 register v4si c
__asm ("xmm16") = a
;
11 asm volatile ("" : "+v" (c
));
13 return ((unsigned int *) &d
)[3];
19 register v2di c
__asm ("xmm16") = a
;
20 asm volatile ("" : "+v" (c
));
22 return ((unsigned long long *) &d
)[1];
28 register v4si c
__asm ("xmm16") = a
;
29 asm volatile ("" : "+v" (c
));
31 return ((unsigned int *) &d
)[3];
35 f4 (v4si a
, unsigned int *p
)
37 register v4si c
__asm ("xmm16") = a
;
38 asm volatile ("" : "+v" (c
));
40 *p
= ((unsigned int *) &d
)[3];
44 f5 (v2di a
, unsigned long long *p
)
46 register v2di c
__asm ("xmm16") = a
;
47 asm volatile ("" : "+v" (c
));
49 *p
= ((unsigned long long *) &d
)[1];
52 /* { dg-final { scan-assembler-times "vpextrd\[^\n\r]*xmm16" 3 } } */
53 /* { dg-final { scan-assembler-times "vpextrq\[^\n\r]*xmm16" 2 } } */