• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test vector replicates, v4f32 version.
2;
3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
4
5; Test a byte-granularity replicate with the lowest useful value.
6define <4 x float> @f1() {
7; CHECK-LABEL: f1:
8; CHECK: vrepib %v24, 1
9; CHECK: br %r14
10  ret <4 x float> <float 0x3820202020000000, float 0x3820202020000000,
11                   float 0x3820202020000000, float 0x3820202020000000>
12}
13
14; Test a byte-granularity replicate with an arbitrary value.
15define <4 x float> @f2() {
16; CHECK-LABEL: f2:
17; CHECK: vrepib %v24, -55
18; CHECK: br %r14
19  ret <4 x float> <float 0xc139393920000000, float 0xc139393920000000,
20                   float 0xc139393920000000, float 0xc139393920000000>
21}
22
23; Test a byte-granularity replicate with the highest useful value.
24define <4 x float> @f3() {
25; CHECK-LABEL: f3:
26; CHECK: vrepib %v24, -2
27; CHECK: br %r14
28  ret <4 x float> <float 0xc7dfdfdfc0000000, float 0xc7dfdfdfc0000000,
29                   float 0xc7dfdfdfc0000000, float 0xc7dfdfdfc0000000>
30}
31
32; Test a halfword-granularity replicate with the lowest useful value.
33define <4 x float> @f4() {
34; CHECK-LABEL: f4:
35; CHECK: vrepih %v24, 1
36; CHECK: br %r14
37  ret <4 x float> <float 0x37a0001000000000, float 0x37a0001000000000,
38                   float 0x37a0001000000000, float 0x37a0001000000000>
39}
40
41; Test a halfword-granularity replicate with an arbitrary value.
42define <4 x float> @f5() {
43; CHECK-LABEL: f5:
44; CHECK: vrepih %v24, 25650
45; CHECK: br %r14
46  ret <4 x float> <float 0x44864c8640000000, float 0x44864c8640000000,
47                   float 0x44864c8640000000, float 0x44864c8640000000>
48}
49
50; Test a halfword-granularity replicate with the highest useful value.
51define <4 x float> @f6() {
52; CHECK-LABEL: f6:
53; CHECK: vrepih %v24, -2
54; CHECK: br %r14
55  ret <4 x float> <float 0xffffdfffc0000000, float 0xffffdfffc0000000,
56                   float 0xffffdfffc0000000, float 0xffffdfffc0000000>
57}
58
59; Test a word-granularity replicate with the lowest useful positive value.
60define <4 x float> @f7() {
61; CHECK-LABEL: f7:
62; CHECK: vrepif %v24, 1
63; CHECK: br %r14
64  ret <4 x float> <float 0x36a0000000000000, float 0x36a0000000000000,
65                   float 0x36a0000000000000, float 0x36a0000000000000>
66}
67
68; Test a word-granularity replicate with the highest in-range value.
69define <4 x float> @f8() {
70; CHECK-LABEL: f8:
71; CHECK: vrepif %v24, 32767
72; CHECK: br %r14
73  ret <4 x float> <float 0x378fffc000000000, float 0x378fffc000000000,
74                   float 0x378fffc000000000, float 0x378fffc000000000>
75}
76
77; Test a word-granularity replicate with the next highest value.
78; This cannot use VREPIF.
79define <4 x float> @f9() {
80; CHECK-LABEL: f9:
81; CHECK-NOT: vrepif
82; CHECK: br %r14
83  ret <4 x float> <float 0x3790000000000000, float 0x3790000000000000,
84                   float 0x3790000000000000, float 0x3790000000000000>
85}
86
87; Test a word-granularity replicate with the lowest in-range value.
88define <4 x float> @f10() {
89; CHECK-LABEL: f10:
90; CHECK: vrepif %v24, -32768
91; CHECK: br %r14
92  ret <4 x float> <float 0xfffff00000000000, float 0xfffff00000000000,
93                   float 0xfffff00000000000, float 0xfffff00000000000>
94}
95
96; Test a word-granularity replicate with the next lowest value.
97; This cannot use VREPIF.
98define <4 x float> @f11() {
99; CHECK-LABEL: f11:
100; CHECK-NOT: vrepif
101; CHECK: br %r14
102  ret <4 x float> <float 0xffffefffe0000000, float 0xffffefffe0000000,
103                   float 0xffffefffe0000000, float 0xffffefffe0000000>
104}
105
106; Test a word-granularity replicate with the highest useful negative value.
107define <4 x float> @f12() {
108; CHECK-LABEL: f12:
109; CHECK: vrepif %v24, -2
110; CHECK: br %r14
111  ret <4 x float> <float 0xffffffffc0000000, float 0xffffffffc0000000,
112                   float 0xffffffffc0000000, float 0xffffffffc0000000>
113}
114
115; Test a doubleword-granularity replicate with the lowest useful positive
116; value.
117define <4 x float> @f13() {
118; CHECK-LABEL: f13:
119; CHECK: vrepig %v24, 1
120; CHECK: br %r14
121  ret <4 x float> <float 0.0, float 0x36a0000000000000,
122                   float 0.0, float 0x36a0000000000000>
123}
124
125; Test a doubleword-granularity replicate with the highest in-range value.
126define <4 x float> @f14() {
127; CHECK-LABEL: f14:
128; CHECK: vrepig %v24, 32767
129; CHECK: br %r14
130  ret <4 x float> <float 0.0, float 0x378fffc000000000,
131                   float 0.0, float 0x378fffc000000000>
132}
133
134; Test a doubleword-granularity replicate with the next highest value.
135; This cannot use VREPIG.
136define <4 x float> @f15() {
137; CHECK-LABEL: f15:
138; CHECK-NOT: vrepig
139; CHECK: br %r14
140  ret <4 x float> <float 0.0, float 0x3790000000000000,
141                   float 0.0, float 0x3790000000000000>
142}
143
144; Test a doubleword-granularity replicate with the lowest in-range value.
145define <4 x float> @f16() {
146; CHECK-LABEL: f16:
147; CHECK: vrepig %v24, -32768
148; CHECK: br %r14
149  ret <4 x float> <float 0xffffffffe0000000, float 0xfffff00000000000,
150                   float 0xffffffffe0000000, float 0xfffff00000000000>
151}
152
153; Test a doubleword-granularity replicate with the next lowest value.
154; This cannot use VREPIG.
155define <4 x float> @f17() {
156; CHECK-LABEL: f17:
157; CHECK-NOT: vrepig
158; CHECK: br %r14
159  ret <4 x float> <float 0xffffffffe0000000, float 0xffffefffe0000000,
160                   float 0xffffffffe0000000, float 0xffffefffe0000000>
161}
162
163; Test a doubleword-granularity replicate with the highest useful negative
164; value.
165define <4 x float> @f18() {
166; CHECK-LABEL: f18:
167; CHECK: vrepig %v24, -2
168; CHECK: br %r14
169  ret <4 x float> <float 0xffffffffe0000000, float 0xffffffffc0000000,
170                   float 0xffffffffe0000000, float 0xffffffffc0000000>
171}
172
173; Repeat f14 with undefs optimistically treated as 0, 32767.
174define <4 x float> @f19() {
175; CHECK-LABEL: f19:
176; CHECK: vrepig %v24, 32767
177; CHECK: br %r14
178  ret <4 x float> <float undef, float undef,
179                   float 0.0, float 0x378fffc000000000>
180}
181
182; Repeat f18 with undefs optimistically treated as -2, -1.
183define <4 x float> @f20() {
184; CHECK-LABEL: f20:
185; CHECK: vrepig %v24, -2
186; CHECK: br %r14
187  ret <4 x float> <float 0xffffffffe0000000, float undef,
188                   float undef, float 0xffffffffc0000000>
189}
190