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
){ 0xff00ff00ff00ff00, 0x00ff00ff00ff00ff };
15 /* { dg-final { scan-assembler-times "vgbm\t%v24,43605" 1 } } */
17 uv4si
__attribute__((noinline
))
20 return (uv4si
){ 0xff0000ff, 0x0000ffff, 0xffff0000, 0x00ffff00 };
22 /* { dg-final { scan-assembler-times "vgbm\t%v24,37830" 1 } } */
24 uv8hi
__attribute__((noinline
))
27 return (uv8hi
){ 0xff00, 0xff00, 0xff00, 0xff00,
28 0xff00, 0xff00, 0xff00, 0xff00 };
30 /* { dg-final { scan-assembler-times "vgbm\t%v24,43690" 1 } } */
32 uv8hi
__attribute__((noinline
))
35 return (uv8hi
){ 0x00ff, 0x00ff, 0x00ff, 0x00ff,
36 0x00ff, 0x00ff, 0x00ff, 0x00ff };
38 /* { dg-final { scan-assembler-times "vgbm\t%v24,21845" 1 } } */
40 uv16qi
__attribute__((noinline
))
43 return (uv16qi
){ 0xff, 0xff, 0xff, 0xff,
48 /* { dg-final { scan-assembler-times "vgbm\t%v24,61605" 1 } } */
53 if (foo1()[1] != 0x00ff00ff00ff00ffULL
)
56 if (foo2()[1] != 0x0000ffff)
59 if (foo3a()[1] != 0xff00)
62 if (foo3b()[1] != 0x00ff)
65 if (foo4()[1] != 0xff)
70 /* { dg-final { cleanup-saved-temps } } */