Debian Codegraph @

gcc/testsuite/gcc.target/s390/vector/vec-extend-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -march=z13 -mzarch" } */
3 /* { dg-final { check-function-bodies "**" "" "" } } */
4
5 typedef signed char v4qi __attribute__ ((vector_size (4)));
6 typedef short v4hi __attribute__ ((vector_size (8)));
7 typedef int v4si __attribute__ ((vector_size (16)));
8
9 typedef unsigned char uv4qi __attribute__ ((vector_size (4)));
10 typedef unsigned short uv4hi __attribute__ ((vector_size (8)));
11 typedef unsigned int uv4si __attribute__ ((vector_size (16)));
12
13 /*
14 ** extendv4qiv4hi2:
15 ** vuphb %v24,%v24
16 ** br %r14
17 */
18
19 v4hi extendv4qiv4hi2 (v4qi x)
20 {
21 return __builtin_convertvector (x, v4hi);
22 }
23
24 /*
25 ** extendv4hiv4si2:
26 ** vuphh %v24,%v24
27 ** br %r14
28 */
29
30 v4si extendv4hiv4si2 (v4hi x)
31 {
32 return __builtin_convertvector (x, v4si);
33 }
34
35 /*
36 ** extenduv4qiuv4hi2:
37 ** vuplhb %v24,%v24
38 ** br %r14
39 */
40
41 uv4hi extenduv4qiuv4hi2 (uv4qi x)
42 {
43 return __builtin_convertvector (x, uv4hi);
44 }
45
46 /*
47 ** extenduv4hiuv4si2:
48 ** vuplhh %v24,%v24
49 ** br %r14
50 */
51
52 uv4si extenduv4hiuv4si2 (uv4hi x)
53 {
54 return __builtin_convertvector (x, uv4si);
55 }