vec-strict-512.ll
13.2 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512f -mattr=+avx512vl -O3 | FileCheck %s
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f -mattr=+avx512vl -O3 | FileCheck %s
declare <8 x double> @llvm.experimental.constrained.fadd.v8f64(<8 x double>, <8 x double>, metadata, metadata)
declare <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float>, <16 x float>, metadata, metadata)
declare <8 x double> @llvm.experimental.constrained.fsub.v8f64(<8 x double>, <8 x double>, metadata, metadata)
declare <16 x float> @llvm.experimental.constrained.fsub.v16f32(<16 x float>, <16 x float>, metadata, metadata)
declare <8 x double> @llvm.experimental.constrained.fmul.v8f64(<8 x double>, <8 x double>, metadata, metadata)
declare <16 x float> @llvm.experimental.constrained.fmul.v16f32(<16 x float>, <16 x float>, metadata, metadata)
declare <8 x double> @llvm.experimental.constrained.fdiv.v8f64(<8 x double>, <8 x double>, metadata, metadata)
declare <16 x float> @llvm.experimental.constrained.fdiv.v16f32(<16 x float>, <16 x float>, metadata, metadata)
declare <8 x double> @llvm.experimental.constrained.sqrt.v8f64(<8 x double>, metadata, metadata)
declare <16 x float> @llvm.experimental.constrained.sqrt.v16f32(<16 x float>, metadata, metadata)
declare <8 x double> @llvm.experimental.constrained.fpext.v8f64.v8f32(<8 x float>, metadata)
declare <8 x float> @llvm.experimental.constrained.fptrunc.v8f32.v8f64(<8 x double>, metadata, metadata)
declare <8 x double> @llvm.experimental.constrained.fma.v8f64(<8 x double>, <8 x double>, <8 x double>, metadata, metadata)
declare <16 x float> @llvm.experimental.constrained.fma.v16f32(<16 x float>, <16 x float>, <16 x float>, metadata, metadata)
declare <16 x float> @llvm.experimental.constrained.ceil.v16f32(<16 x float>, metadata)
declare <8 x double> @llvm.experimental.constrained.ceil.v8f64(<8 x double>, metadata)
declare <16 x float> @llvm.experimental.constrained.floor.v16f32(<16 x float>, metadata)
declare <8 x double> @llvm.experimental.constrained.floor.v8f64(<8 x double>, metadata)
declare <16 x float> @llvm.experimental.constrained.trunc.v16f32(<16 x float>, metadata)
declare <8 x double> @llvm.experimental.constrained.trunc.v8f64(<8 x double>, metadata)
declare <16 x float> @llvm.experimental.constrained.rint.v16f32(<16 x float>, metadata, metadata)
declare <8 x double> @llvm.experimental.constrained.rint.v8f64(<8 x double>, metadata, metadata)
declare <16 x float> @llvm.experimental.constrained.nearbyint.v16f32(<16 x float>, metadata, metadata)
declare <8 x double> @llvm.experimental.constrained.nearbyint.v8f64(<8 x double>, metadata, metadata)
define <8 x double> @f1(<8 x double> %a, <8 x double> %b) #0 {
; CHECK-LABEL: f1:
; CHECK: # %bb.0:
; CHECK-NEXT: vaddpd %zmm1, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <8 x double> @llvm.experimental.constrained.fadd.v8f64(<8 x double> %a, <8 x double> %b,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <8 x double> %ret
}
define <16 x float> @f2(<16 x float> %a, <16 x float> %b) #0 {
; CHECK-LABEL: f2:
; CHECK: # %bb.0:
; CHECK-NEXT: vaddps %zmm1, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %a, <16 x float> %b,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <16 x float> %ret
}
define <8 x double> @f3(<8 x double> %a, <8 x double> %b) #0 {
; CHECK-LABEL: f3:
; CHECK: # %bb.0:
; CHECK-NEXT: vsubpd %zmm1, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <8 x double> @llvm.experimental.constrained.fsub.v8f64(<8 x double> %a, <8 x double> %b,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <8 x double> %ret
}
define <16 x float> @f4(<16 x float> %a, <16 x float> %b) #0 {
; CHECK-LABEL: f4:
; CHECK: # %bb.0:
; CHECK-NEXT: vsubps %zmm1, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <16 x float> @llvm.experimental.constrained.fsub.v16f32(<16 x float> %a, <16 x float> %b,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <16 x float> %ret
}
define <8 x double> @f5(<8 x double> %a, <8 x double> %b) #0 {
; CHECK-LABEL: f5:
; CHECK: # %bb.0:
; CHECK-NEXT: vmulpd %zmm1, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <8 x double> @llvm.experimental.constrained.fmul.v8f64(<8 x double> %a, <8 x double> %b,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <8 x double> %ret
}
define <16 x float> @f6(<16 x float> %a, <16 x float> %b) #0 {
; CHECK-LABEL: f6:
; CHECK: # %bb.0:
; CHECK-NEXT: vmulps %zmm1, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <16 x float> @llvm.experimental.constrained.fmul.v16f32(<16 x float> %a, <16 x float> %b,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <16 x float> %ret
}
define <8 x double> @f7(<8 x double> %a, <8 x double> %b) #0 {
; CHECK-LABEL: f7:
; CHECK: # %bb.0:
; CHECK-NEXT: vdivpd %zmm1, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <8 x double> @llvm.experimental.constrained.fdiv.v8f64(<8 x double> %a, <8 x double> %b,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <8 x double> %ret
}
define <16 x float> @f8(<16 x float> %a, <16 x float> %b) #0 {
; CHECK-LABEL: f8:
; CHECK: # %bb.0:
; CHECK-NEXT: vdivps %zmm1, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <16 x float> @llvm.experimental.constrained.fdiv.v16f32(<16 x float> %a, <16 x float> %b,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <16 x float> %ret
}
define <8 x double> @f9(<8 x double> %a) #0 {
; CHECK-LABEL: f9:
; CHECK: # %bb.0:
; CHECK-NEXT: vsqrtpd %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <8 x double> @llvm.experimental.constrained.sqrt.v8f64(
<8 x double> %a,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <8 x double> %ret
}
define <16 x float> @f10(<16 x float> %a) #0 {
; CHECK-LABEL: f10:
; CHECK: # %bb.0:
; CHECK-NEXT: vsqrtps %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <16 x float> @llvm.experimental.constrained.sqrt.v16f32(
<16 x float> %a,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <16 x float > %ret
}
define <8 x double> @f11(<8 x float> %a) #0 {
; CHECK-LABEL: f11:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvtps2pd %ymm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <8 x double> @llvm.experimental.constrained.fpext.v8f64.v8f32(
<8 x float> %a,
metadata !"fpexcept.strict") #0
ret <8 x double> %ret
}
define <8 x float> @f12(<8 x double> %a) #0 {
; CHECK-LABEL: f12:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvtpd2ps %zmm0, %ymm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <8 x float> @llvm.experimental.constrained.fptrunc.v8f32.v8f64(
<8 x double> %a,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <8 x float> %ret
}
define <16 x float> @f13(<16 x float> %a, <16 x float> %b, <16 x float> %c) #0 {
; CHECK-LABEL: f13:
; CHECK: # %bb.0:
; CHECK-NEXT: vfmadd213ps {{.*#+}} zmm0 = (zmm1 * zmm0) + zmm2
; CHECK-NEXT: ret{{[l|q]}}
%res = call <16 x float> @llvm.experimental.constrained.fma.v16f32(<16 x float> %a, <16 x float> %b, <16 x float> %c,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <16 x float> %res
}
define <8 x double> @f14(<8 x double> %a, <8 x double> %b, <8 x double> %c) #0 {
; CHECK-LABEL: f14:
; CHECK: # %bb.0:
; CHECK-NEXT: vfmadd213pd {{.*#+}} zmm0 = (zmm1 * zmm0) + zmm2
; CHECK-NEXT: ret{{[l|q]}}
%res = call <8 x double> @llvm.experimental.constrained.fma.v8f64(<8 x double> %a, <8 x double> %b, <8 x double> %c,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret <8 x double> %res
}
define <16 x float> @strict_vector_fceil_v16f32(<16 x float> %f) #0 {
; CHECK-LABEL: strict_vector_fceil_v16f32:
; CHECK: # %bb.0:
; CHECK-NEXT: vrndscaleps $10, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%res = call <16 x float> @llvm.experimental.constrained.ceil.v16f32(<16 x float> %f, metadata !"fpexcept.strict") #0
ret <16 x float> %res
}
define <8 x double> @strict_vector_fceil_v8f64(<8 x double> %f) #0 {
; CHECK-LABEL: strict_vector_fceil_v8f64:
; CHECK: # %bb.0:
; CHECK-NEXT: vrndscalepd $10, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%res = call <8 x double> @llvm.experimental.constrained.ceil.v8f64(<8 x double> %f, metadata !"fpexcept.strict") #0
ret <8 x double> %res
}
define <16 x float> @strict_vector_ffloor_v16f32(<16 x float> %f) #0 {
; CHECK-LABEL: strict_vector_ffloor_v16f32:
; CHECK: # %bb.0:
; CHECK-NEXT: vrndscaleps $9, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%res = call <16 x float> @llvm.experimental.constrained.floor.v16f32(<16 x float> %f, metadata !"fpexcept.strict") #0
ret <16 x float> %res
}
define <8 x double> @strict_vector_ffloor_v8f64(<8 x double> %f) #0 {
; CHECK-LABEL: strict_vector_ffloor_v8f64:
; CHECK: # %bb.0:
; CHECK-NEXT: vrndscalepd $9, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%res = call <8 x double> @llvm.experimental.constrained.floor.v8f64(<8 x double> %f, metadata !"fpexcept.strict") #0
ret <8 x double> %res
}
define <16 x float> @strict_vector_ftrunc_v16f32(<16 x float> %f) #0 {
; CHECK-LABEL: strict_vector_ftrunc_v16f32:
; CHECK: # %bb.0:
; CHECK-NEXT: vrndscaleps $11, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%res = call <16 x float> @llvm.experimental.constrained.trunc.v16f32(<16 x float> %f, metadata !"fpexcept.strict") #0
ret <16 x float> %res
}
define <8 x double> @strict_vector_ftrunc_v8f64(<8 x double> %f) #0 {
; CHECK-LABEL: strict_vector_ftrunc_v8f64:
; CHECK: # %bb.0:
; CHECK-NEXT: vrndscalepd $11, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%res = call <8 x double> @llvm.experimental.constrained.trunc.v8f64(<8 x double> %f, metadata !"fpexcept.strict") #0
ret <8 x double> %res
}
define <16 x float> @strict_vector_frint_v16f32(<16 x float> %f) #0 {
; CHECK-LABEL: strict_vector_frint_v16f32:
; CHECK: # %bb.0:
; CHECK-NEXT: vrndscaleps $4, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%res = call <16 x float> @llvm.experimental.constrained.rint.v16f32(<16 x float> %f,
metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret <16 x float> %res
}
define <8 x double> @strict_vector_frint_v8f64(<8 x double> %f) #0 {
; CHECK-LABEL: strict_vector_frint_v8f64:
; CHECK: # %bb.0:
; CHECK-NEXT: vrndscalepd $4, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%res = call <8 x double> @llvm.experimental.constrained.rint.v8f64(<8 x double> %f,
metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret <8 x double> %res
}
define <16 x float> @strict_vector_fnearbyint_v16f32(<16 x float> %f) #0 {
; CHECK-LABEL: strict_vector_fnearbyint_v16f32:
; CHECK: # %bb.0:
; CHECK-NEXT: vrndscaleps $12, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%res = call <16 x float> @llvm.experimental.constrained.nearbyint.v16f32(<16 x float> %f,
metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret <16 x float> %res
}
define <8 x double> @strict_vector_fnearbyint_v8f64(<8 x double> %f) #0 {
; CHECK-LABEL: strict_vector_fnearbyint_v8f64:
; CHECK: # %bb.0:
; CHECK-NEXT: vrndscalepd $12, %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%res = call <8 x double> @llvm.experimental.constrained.nearbyint.v8f64(<8 x double> %f,
metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret <8 x double> %res
}
attributes #0 = { strictfp }