S/390: Vector base support - testcases
[gcc.git] / gcc / testsuite / gcc.target / s390 / vector / vec-genbytemask-2.c
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -mzarch -march=z13" } */
3
4 typedef unsigned char uv16qi __attribute__((vector_size(16)));
5 typedef unsigned short uv8hi __attribute__((vector_size(16)));
6 typedef unsigned int uv4si __attribute__((vector_size(16)));
7 typedef unsigned long long uv2di __attribute__((vector_size(16)));
8
9 /* The elements differ. */
10 uv2di __attribute__((noinline))
11 foo1 ()
12 {
13 return (uv2di){ 0x001fffffffffff00, 0x0000ffffffffff00 };
14 }
15
16 /* Non-contiguous bitmasks */
17
18 uv4si __attribute__((noinline))
19 foo2 ()
20 {
21 return (uv4si){ 0xff00100f, 0xff00100f, 0xff00100f, 0xff00100f };
22 }
23
24 uv8hi __attribute__((noinline))
25 foo3a ()
26 {
27 return (uv8hi){ 0xf700, 0xf700, 0xf700, 0xf700,
28 0xf700, 0xf700, 0xf700, 0xf700 };
29 }
30
31 uv8hi __attribute__((noinline))
32 foo3b ()
33 {
34 return (uv8hi){ 0x10ff, 0x10ff, 0x10ff, 0x10ff,
35 0x10ff, 0x10ff, 0x10ff, 0x10ff };
36 }
37
38 uv16qi __attribute__((noinline))
39 foo4 ()
40 {
41 return (uv16qi){ 0x82, 0x82, 0x82, 0x82,
42 0x82, 0x82, 0x82, 0x82,
43 0x82, 0x82, 0x82, 0x82,
44 0x82, 0x82, 0x82, 0x82 };
45 }
46 /* { dg-final { scan-assembler-not "vgbm" } } */