summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/s390/vector/vec-genmask-2.c
blob: e3ae34154cafe99de02a191b77e87c38cac4d041 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* { dg-do compile } */
/* { dg-options "-O3 -mzarch -march=z13" } */

typedef unsigned char     uv16qi __attribute__((vector_size(16)));
typedef unsigned short     uv8hi __attribute__((vector_size(16)));
typedef unsigned int       uv4si __attribute__((vector_size(16)));
typedef unsigned long long uv2di __attribute__((vector_size(16)));

/* The elements differ.  */
uv2di __attribute__((noinline))
foo1 ()
{
  return (uv2di){ 0x000fffffffffff00, 0x0000ffffffffff00 };
}

/* Non-contiguous bitmasks */

uv4si __attribute__((noinline))
foo2 ()
{
  return (uv4si){ 0xff00100f, 0xff00100f, 0xff00100f, 0xff00100f };
}

uv8hi __attribute__((noinline))
foo3a ()
{
  return (uv8hi){ 0xf700, 0xf700, 0xf700, 0xf700,
      0xf700, 0xf700, 0xf700, 0xf700 };
}

uv8hi __attribute__((noinline))
foo3b ()
{
  return (uv8hi){ 0x10ff, 0x10ff, 0x10ff, 0x10ff,
      0x10ff, 0x10ff, 0x10ff, 0x10ff };
}

uv16qi __attribute__((noinline))
foo4 ()
{
  return (uv16qi){ 0x82, 0x82, 0x82, 0x82,
      0x82, 0x82, 0x82, 0x82,
      0x82, 0x82, 0x82, 0x82,
      0x82, 0x82, 0x82, 0x82 };
}
/* { dg-final { scan-assembler-not "vgm" } } */