2 /* { dg-options "-O3 -mzarch -march=z13 --save-temps" } */
3 /* { dg-require-effective-target vector } */
5 typedef unsigned char uv16qi
__attribute__((vector_size(16)));
6 typedef unsigned short uv8hi
__attribute__((vector_size(16)));
7 typedef unsigned int uv4si
__attribute__((vector_size(16)));
8 typedef unsigned long long uv2di
__attribute__((vector_size(16)));
10 uv2di
__attribute__((noinline
))
13 return (uv2di
){ 0x000fffffffffff00, 0x000fffffffffff00 };
15 /* { dg-final { scan-assembler-times "vgmg\t%v24,12,55" 1 } } */
17 uv4si
__attribute__((noinline
))
20 return (uv4si
){ 0xff00000f, 0xff00000f, 0xff00000f, 0xff00000f };
22 /* { dg-final { scan-assembler-times "vgmf\t%v24,28,7" 1 } } */
24 uv8hi
__attribute__((noinline
))
27 return (uv8hi
){ 0xfff0, 0xfff0, 0xfff0, 0xfff0,
28 0xfff0, 0xfff0, 0xfff0, 0xfff0 };
30 /* { dg-final { scan-assembler-times "vgmh\t%v24,0,11" 1 } } */
32 uv8hi
__attribute__((noinline
))
35 return (uv8hi
){ 0x0fff, 0x0fff, 0x0fff, 0x0fff,
36 0x0fff, 0x0fff, 0x0fff, 0x0fff };
38 /* { dg-final { scan-assembler-times "vgmh\t%v24,4,15" 1 } } */
40 uv16qi
__attribute__((noinline
))
43 return (uv16qi
){ 0x8, 0x8, 0x8, 0x8,
48 /* { dg-final { scan-assembler-times "vgmb\t%v24,4,4" 1 } } */
53 if (foo1()[1] != 0x000fffffffffff00ULL
)
56 if (foo2()[1] != 0xff00000f)
59 if (foo3a()[1] != 0xfff0)
62 if (foo3b()[1] != 0x0fff)
70 /* { dg-final { cleanup-saved-temps } } */