Debian Codegraph @

gcc/testsuite/gcc.target/s390/vector/vrepi-sf-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target s390_vxe } */
3 /* { dg-options "-O2 -march=z14 -mzarch" } */
4 /* { dg-final { check-function-bodies "**" "" "" } } */
5
6 /* Test loading constants which cannot be loaded via VECTOR GENERATE BYTE MASK
7 nor via VECTOR GENERATE MASK but via VECTOR REPLICATE IMMEDIATE. */
8
9 typedef float v1sf __attribute__ ((vector_size (4)));
10 typedef float v2sf __attribute__ ((vector_size (8)));
11 typedef float v4sf __attribute__ ((vector_size (16)));
12
13 /*
14 ** test_v1sf_via_vrepib:
15 ** vrepi %v24,-86,0
16 ** br %r14
17 */
18
19 v1sf
20 test_v1sf_via_vrepib (void)
21 {
22 return (v1sf){-3.03164883e-13f};
23 }
24
25 /*
26 ** test_v2sf_via_vrepib:
27 ** vrepi %v24,-86,0
28 ** br %r14
29 */
30
31 v2sf
32 test_v2sf_via_vrepib (void)
33 {
34 return (v2sf){-3.03164883e-13f, -3.03164883e-13f};
35 }
36
37 /*
38 ** test_v4sf_via_vrepib:
39 ** vrepi %v24,-86,0
40 ** br %r14
41 */
42
43 v4sf
44 test_v4sf_via_vrepib (void)
45 {
46 return (v4sf){-3.03164883e-13f, -3.03164883e-13f, -3.03164883e-13f, -3.03164883e-13f};
47 }
48
49 /*
50 ** test_v1sf_via_vrepih:
51 ** vrepi %v24,-16643,1
52 ** br %r14
53 */
54
55 v1sf
56 test_v1sf_via_vrepih (void)
57 {
58 return (v1sf){-0.49559775f};
59 }
60
61 /*
62 ** test_v2sf_via_vrepih:
63 ** vrepi %v24,-16643,1
64 ** br %r14
65 */
66
67 v2sf
68 test_v2sf_via_vrepih (void)
69 {
70 return (v2sf){-0.49559775f, -0.49559775f};
71 }
72
73 /*
74 ** test_v4sf_via_vrepih:
75 ** vrepi %v24,-16643,1
76 ** br %r14
77 */
78
79 v4sf
80 test_v4sf_via_vrepih (void)
81 {
82 return (v4sf){-0.49559775f, -0.49559775f, -0.49559775f, -0.49559775f};
83 }