1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -S < %s | FileCheck %s --check-prefixes=CHECK
3 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-light -attributor-manifest-internal -S < %s | FileCheck %s --check-prefixes=LIGHT
5 declare float @llvm.round.f32(float)
6 declare ppc_fp128 @llvm.round.ppcf128(ppc_fp128)
8 define float @ret_round(float %arg0) {
9 ; CHECK-LABEL: define nofpclass(sub) float @ret_round
10 ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] {
11 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]]
12 ; CHECK-NEXT: ret float [[CALL]]
14 ; LIGHT-LABEL: define float @ret_round
15 ; LIGHT-SAME: (float [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] {
16 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]]
17 ; LIGHT-NEXT: ret float [[CALL]]
19 %call = call float @llvm.round.f32(float %arg0)
23 define float @ret_round_noinf(float nofpclass(inf) %arg0) {
24 ; CHECK-LABEL: define nofpclass(inf sub) float @ret_round_noinf
25 ; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] {
26 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf sub) float @llvm.round.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR2]]
27 ; CHECK-NEXT: ret float [[CALL]]
29 ; LIGHT-LABEL: define float @ret_round_noinf
30 ; LIGHT-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] {
31 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR2]]
32 ; LIGHT-NEXT: ret float [[CALL]]
34 %call = call float @llvm.round.f32(float %arg0)
38 define float @ret_round_nopinf(float nofpclass(pinf) %arg0) {
39 ; CHECK-LABEL: define nofpclass(pinf sub) float @ret_round_nopinf
40 ; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] {
41 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.round.f32(float nofpclass(pinf) [[ARG0]]) #[[ATTR2]]
42 ; CHECK-NEXT: ret float [[CALL]]
44 ; LIGHT-LABEL: define float @ret_round_nopinf
45 ; LIGHT-SAME: (float nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] {
46 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(pinf) [[ARG0]]) #[[ATTR2]]
47 ; LIGHT-NEXT: ret float [[CALL]]
49 %call = call float @llvm.round.f32(float %arg0)
53 define float @ret_round_noninf(float nofpclass(ninf) %arg0) {
54 ; CHECK-LABEL: define nofpclass(ninf sub) float @ret_round_noninf
55 ; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] {
56 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.round.f32(float nofpclass(ninf) [[ARG0]]) #[[ATTR2]]
57 ; CHECK-NEXT: ret float [[CALL]]
59 ; LIGHT-LABEL: define float @ret_round_noninf
60 ; LIGHT-SAME: (float nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] {
61 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(ninf) [[ARG0]]) #[[ATTR2]]
62 ; LIGHT-NEXT: ret float [[CALL]]
64 %call = call float @llvm.round.f32(float %arg0)
68 define float @ret_round_nonan(float nofpclass(nan) %arg0) {
69 ; CHECK-LABEL: define nofpclass(nan sub) float @ret_round_nonan
70 ; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] {
71 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) float @llvm.round.f32(float nofpclass(nan) [[ARG0]]) #[[ATTR2]]
72 ; CHECK-NEXT: ret float [[CALL]]
74 ; LIGHT-LABEL: define float @ret_round_nonan
75 ; LIGHT-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] {
76 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(nan) [[ARG0]]) #[[ATTR2]]
77 ; LIGHT-NEXT: ret float [[CALL]]
79 %call = call float @llvm.round.f32(float %arg0)
83 define float @ret_round_noqnan(float nofpclass(qnan) %arg0) {
84 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_noqnan
85 ; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] {
86 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(qnan) [[ARG0]]) #[[ATTR2]]
87 ; CHECK-NEXT: ret float [[CALL]]
89 ; LIGHT-LABEL: define float @ret_round_noqnan
90 ; LIGHT-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] {
91 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(qnan) [[ARG0]]) #[[ATTR2]]
92 ; LIGHT-NEXT: ret float [[CALL]]
94 %call = call float @llvm.round.f32(float %arg0)
98 define float @ret_round_nosnan(float nofpclass(snan) %arg0) {
99 ; CHECK-LABEL: define nofpclass(snan sub) float @ret_round_nosnan
100 ; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] {
101 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.round.f32(float nofpclass(snan) [[ARG0]]) #[[ATTR2]]
102 ; CHECK-NEXT: ret float [[CALL]]
104 ; LIGHT-LABEL: define float @ret_round_nosnan
105 ; LIGHT-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] {
106 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(snan) [[ARG0]]) #[[ATTR2]]
107 ; LIGHT-NEXT: ret float [[CALL]]
109 %call = call float @llvm.round.f32(float %arg0)
113 define float @ret_round_nozero(float nofpclass(zero) %arg0) {
114 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nozero
115 ; CHECK-SAME: (float nofpclass(zero) [[ARG0:%.*]]) #[[ATTR1]] {
116 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(zero) [[ARG0]]) #[[ATTR2]]
117 ; CHECK-NEXT: ret float [[CALL]]
119 ; LIGHT-LABEL: define float @ret_round_nozero
120 ; LIGHT-SAME: (float nofpclass(zero) [[ARG0:%.*]]) #[[ATTR1]] {
121 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(zero) [[ARG0]]) #[[ATTR2]]
122 ; LIGHT-NEXT: ret float [[CALL]]
124 %call = call float @llvm.round.f32(float %arg0)
128 define float @ret_round_nopzero(float nofpclass(pzero) %arg0) {
129 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopzero
130 ; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]]) #[[ATTR1]] {
131 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(pzero) [[ARG0]]) #[[ATTR2]]
132 ; CHECK-NEXT: ret float [[CALL]]
134 ; LIGHT-LABEL: define float @ret_round_nopzero
135 ; LIGHT-SAME: (float nofpclass(pzero) [[ARG0:%.*]]) #[[ATTR1]] {
136 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(pzero) [[ARG0]]) #[[ATTR2]]
137 ; LIGHT-NEXT: ret float [[CALL]]
139 %call = call float @llvm.round.f32(float %arg0)
143 define float @ret_round_nonzero(float nofpclass(nzero) %arg0) {
144 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonzero
145 ; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]]) #[[ATTR1]] {
146 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(nzero) [[ARG0]]) #[[ATTR2]]
147 ; CHECK-NEXT: ret float [[CALL]]
149 ; LIGHT-LABEL: define float @ret_round_nonzero
150 ; LIGHT-SAME: (float nofpclass(nzero) [[ARG0:%.*]]) #[[ATTR1]] {
151 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(nzero) [[ARG0]]) #[[ATTR2]]
152 ; LIGHT-NEXT: ret float [[CALL]]
154 %call = call float @llvm.round.f32(float %arg0)
158 define float @ret_round_nonorm(float nofpclass(norm) %arg0) {
159 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonorm
160 ; CHECK-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] {
161 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(norm) [[ARG0]]) #[[ATTR2]]
162 ; CHECK-NEXT: ret float [[CALL]]
164 ; LIGHT-LABEL: define float @ret_round_nonorm
165 ; LIGHT-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] {
166 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(norm) [[ARG0]]) #[[ATTR2]]
167 ; LIGHT-NEXT: ret float [[CALL]]
169 %call = call float @llvm.round.f32(float %arg0)
173 define float @ret_round_nonnorm(float nofpclass(nnorm) %arg0) {
174 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonnorm
175 ; CHECK-SAME: (float nofpclass(nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
176 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(nnorm) [[ARG0]]) #[[ATTR2]]
177 ; CHECK-NEXT: ret float [[CALL]]
179 ; LIGHT-LABEL: define float @ret_round_nonnorm
180 ; LIGHT-SAME: (float nofpclass(nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
181 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(nnorm) [[ARG0]]) #[[ATTR2]]
182 ; LIGHT-NEXT: ret float [[CALL]]
184 %call = call float @llvm.round.f32(float %arg0)
188 define float @ret_round_nopnorm(float nofpclass(pnorm) %arg0) {
189 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopnorm
190 ; CHECK-SAME: (float nofpclass(pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
191 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(pnorm) [[ARG0]]) #[[ATTR2]]
192 ; CHECK-NEXT: ret float [[CALL]]
194 ; LIGHT-LABEL: define float @ret_round_nopnorm
195 ; LIGHT-SAME: (float nofpclass(pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
196 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(pnorm) [[ARG0]]) #[[ATTR2]]
197 ; LIGHT-NEXT: ret float [[CALL]]
199 %call = call float @llvm.round.f32(float %arg0)
203 define float @ret_round_nonsub(float nofpclass(nsub) %arg0) {
204 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonsub
205 ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR1]] {
206 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(nsub) [[ARG0]]) #[[ATTR2]]
207 ; CHECK-NEXT: ret float [[CALL]]
209 ; LIGHT-LABEL: define float @ret_round_nonsub
210 ; LIGHT-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR1]] {
211 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(nsub) [[ARG0]]) #[[ATTR2]]
212 ; LIGHT-NEXT: ret float [[CALL]]
214 %call = call float @llvm.round.f32(float %arg0)
218 define float @ret_round_nopsub(float nofpclass(psub) %arg0) {
219 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopsub
220 ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR1]] {
221 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(psub) [[ARG0]]) #[[ATTR2]]
222 ; CHECK-NEXT: ret float [[CALL]]
224 ; LIGHT-LABEL: define float @ret_round_nopsub
225 ; LIGHT-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR1]] {
226 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(psub) [[ARG0]]) #[[ATTR2]]
227 ; LIGHT-NEXT: ret float [[CALL]]
229 %call = call float @llvm.round.f32(float %arg0)
233 define float @ret_round_nonorm_nosub(float nofpclass(norm sub) %arg0) {
234 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonorm_nosub
235 ; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] {
236 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(sub norm) [[ARG0]]) #[[ATTR2]]
237 ; CHECK-NEXT: ret float [[CALL]]
239 ; LIGHT-LABEL: define float @ret_round_nonorm_nosub
240 ; LIGHT-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] {
241 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(sub norm) [[ARG0]]) #[[ATTR2]]
242 ; LIGHT-NEXT: ret float [[CALL]]
244 %call = call float @llvm.round.f32(float %arg0)
248 define float @ret_round_nopnorm_nopsub(float nofpclass(pnorm psub) %arg0) {
249 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopnorm_nopsub
250 ; CHECK-SAME: (float nofpclass(psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
251 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(psub pnorm) [[ARG0]]) #[[ATTR2]]
252 ; CHECK-NEXT: ret float [[CALL]]
254 ; LIGHT-LABEL: define float @ret_round_nopnorm_nopsub
255 ; LIGHT-SAME: (float nofpclass(psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
256 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(psub pnorm) [[ARG0]]) #[[ATTR2]]
257 ; LIGHT-NEXT: ret float [[CALL]]
259 %call = call float @llvm.round.f32(float %arg0)
263 define float @ret_round_nonnorm_nonsub(float nofpclass(nnorm nsub) %arg0) {
264 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonnorm_nonsub
265 ; CHECK-SAME: (float nofpclass(nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
266 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(nsub nnorm) [[ARG0]]) #[[ATTR2]]
267 ; CHECK-NEXT: ret float [[CALL]]
269 ; LIGHT-LABEL: define float @ret_round_nonnorm_nonsub
270 ; LIGHT-SAME: (float nofpclass(nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
271 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(nsub nnorm) [[ARG0]]) #[[ATTR2]]
272 ; LIGHT-NEXT: ret float [[CALL]]
274 %call = call float @llvm.round.f32(float %arg0)
278 define float @ret_round_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) {
279 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopnorm_nonsub
280 ; CHECK-SAME: (float nofpclass(nsub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
281 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(nsub pnorm) [[ARG0]]) #[[ATTR2]]
282 ; CHECK-NEXT: ret float [[CALL]]
284 ; LIGHT-LABEL: define float @ret_round_nopnorm_nonsub
285 ; LIGHT-SAME: (float nofpclass(nsub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
286 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(nsub pnorm) [[ARG0]]) #[[ATTR2]]
287 ; LIGHT-NEXT: ret float [[CALL]]
289 %call = call float @llvm.round.f32(float %arg0)
293 define ppc_fp128 @ret_round_ppcf128(ppc_fp128 %arg0) {
294 ; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_round_ppcf128
295 ; CHECK-SAME: (ppc_fp128 [[ARG0:%.*]]) #[[ATTR1]] {
296 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
297 ; CHECK-NEXT: ret ppc_fp128 [[CALL]]
299 ; LIGHT-LABEL: define ppc_fp128 @ret_round_ppcf128
300 ; LIGHT-SAME: (ppc_fp128 [[ARG0:%.*]]) #[[ATTR1]] {
301 ; LIGHT-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
302 ; LIGHT-NEXT: ret ppc_fp128 [[CALL]]
304 %call = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %arg0)
308 define ppc_fp128 @ret_round_noinf_ppcf128(ppc_fp128 nofpclass(inf) %arg0) {
309 ; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_round_noinf_ppcf128
310 ; CHECK-SAME: (ppc_fp128 nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] {
311 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.round.ppcf128(ppc_fp128 nofpclass(inf) [[ARG0]]) #[[ATTR2]]
312 ; CHECK-NEXT: ret ppc_fp128 [[CALL]]
314 ; LIGHT-LABEL: define ppc_fp128 @ret_round_noinf_ppcf128
315 ; LIGHT-SAME: (ppc_fp128 nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] {
316 ; LIGHT-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 nofpclass(inf) [[ARG0]]) #[[ATTR2]]
317 ; LIGHT-NEXT: ret ppc_fp128 [[CALL]]
319 %call = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %arg0)
323 define ppc_fp128 @ret_round_nopinf_ppcf128(ppc_fp128 nofpclass(pinf) %arg0) {
324 ; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_round_nopinf_ppcf128
325 ; CHECK-SAME: (ppc_fp128 nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] {
326 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.round.ppcf128(ppc_fp128 nofpclass(pinf) [[ARG0]]) #[[ATTR2]]
327 ; CHECK-NEXT: ret ppc_fp128 [[CALL]]
329 ; LIGHT-LABEL: define ppc_fp128 @ret_round_nopinf_ppcf128
330 ; LIGHT-SAME: (ppc_fp128 nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] {
331 ; LIGHT-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 nofpclass(pinf) [[ARG0]]) #[[ATTR2]]
332 ; LIGHT-NEXT: ret ppc_fp128 [[CALL]]
334 %call = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %arg0)
338 define ppc_fp128 @ret_round_noninf_ppcf128(ppc_fp128 nofpclass(ninf) %arg0) {
339 ; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_round_noninf_ppcf128
340 ; CHECK-SAME: (ppc_fp128 nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] {
341 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.round.ppcf128(ppc_fp128 nofpclass(ninf) [[ARG0]]) #[[ATTR2]]
342 ; CHECK-NEXT: ret ppc_fp128 [[CALL]]
344 ; LIGHT-LABEL: define ppc_fp128 @ret_round_noninf_ppcf128
345 ; LIGHT-SAME: (ppc_fp128 nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] {
346 ; LIGHT-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 nofpclass(ninf) [[ARG0]]) #[[ATTR2]]
347 ; LIGHT-NEXT: ret ppc_fp128 [[CALL]]
349 %call = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %arg0)
353 define ppc_fp128 @ret_round_nonan_ppcf128(ppc_fp128 nofpclass(nan) %arg0) {
354 ; CHECK-LABEL: define nofpclass(nan sub) ppc_fp128 @ret_round_nonan_ppcf128
355 ; CHECK-SAME: (ppc_fp128 nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] {
356 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) ppc_fp128 @llvm.round.ppcf128(ppc_fp128 nofpclass(nan) [[ARG0]]) #[[ATTR2]]
357 ; CHECK-NEXT: ret ppc_fp128 [[CALL]]
359 ; LIGHT-LABEL: define ppc_fp128 @ret_round_nonan_ppcf128
360 ; LIGHT-SAME: (ppc_fp128 nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] {
361 ; LIGHT-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 nofpclass(nan) [[ARG0]]) #[[ATTR2]]
362 ; LIGHT-NEXT: ret ppc_fp128 [[CALL]]
364 %call = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %arg0)
368 define float @ret_round_noneg(float nofpclass(ninf nsub nnorm) %arg0) {
369 ; CHECK-LABEL: define nofpclass(ninf sub) float @ret_round_noneg
370 ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
371 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.round.f32(float nofpclass(ninf nsub nnorm) [[ARG0]]) #[[ATTR2]]
372 ; CHECK-NEXT: ret float [[CALL]]
374 ; LIGHT-LABEL: define float @ret_round_noneg
375 ; LIGHT-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
376 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(ninf nsub nnorm) [[ARG0]]) #[[ATTR2]]
377 ; LIGHT-NEXT: ret float [[CALL]]
379 %call = call float @llvm.round.f32(float %arg0)
383 define float @ret_round_noneg_nonegzero(float nofpclass(ninf nsub nnorm nzero) %arg0) {
384 ; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_round_noneg_nonegzero
385 ; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
386 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.round.f32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]]) #[[ATTR2]]
387 ; CHECK-NEXT: ret float [[CALL]]
389 ; LIGHT-LABEL: define float @ret_round_noneg_nonegzero
390 ; LIGHT-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
391 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]]) #[[ATTR2]]
392 ; LIGHT-NEXT: ret float [[CALL]]
394 %call = call float @llvm.round.f32(float %arg0)
398 define float @ret_round_noneg_nonegzero_nonan(float nofpclass(ninf nsub nnorm nzero nan) %arg0) {
399 ; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_round_noneg_nonegzero_nonan
400 ; CHECK-SAME: (float nofpclass(nan ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
401 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.round.f32(float nofpclass(nan ninf nzero nsub nnorm) [[ARG0]]) #[[ATTR2]]
402 ; CHECK-NEXT: ret float [[CALL]]
404 ; LIGHT-LABEL: define float @ret_round_noneg_nonegzero_nonan
405 ; LIGHT-SAME: (float nofpclass(nan ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
406 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(nan ninf nzero nsub nnorm) [[ARG0]]) #[[ATTR2]]
407 ; LIGHT-NEXT: ret float [[CALL]]
409 %call = call float @llvm.round.f32(float %arg0)
413 define float @ret_round_noneg_nozero(float nofpclass(ninf nsub nnorm zero) %arg0) {
414 ; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_round_noneg_nozero
415 ; CHECK-SAME: (float nofpclass(ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
416 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.round.f32(float nofpclass(ninf zero nsub nnorm) [[ARG0]]) #[[ATTR2]]
417 ; CHECK-NEXT: ret float [[CALL]]
419 ; LIGHT-LABEL: define float @ret_round_noneg_nozero
420 ; LIGHT-SAME: (float nofpclass(ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
421 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(ninf zero nsub nnorm) [[ARG0]]) #[[ATTR2]]
422 ; LIGHT-NEXT: ret float [[CALL]]
424 %call = call float @llvm.round.f32(float %arg0)
428 define float @ret_round_noneg_nozero_nonan(float nofpclass(ninf nsub nnorm zero nan) %arg0) {
429 ; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_round_noneg_nozero_nonan
430 ; CHECK-SAME: (float nofpclass(nan ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
431 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.round.f32(float nofpclass(nan ninf zero nsub nnorm) [[ARG0]]) #[[ATTR2]]
432 ; CHECK-NEXT: ret float [[CALL]]
434 ; LIGHT-LABEL: define float @ret_round_noneg_nozero_nonan
435 ; LIGHT-SAME: (float nofpclass(nan ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
436 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(nan ninf zero nsub nnorm) [[ARG0]]) #[[ATTR2]]
437 ; LIGHT-NEXT: ret float [[CALL]]
439 %call = call float @llvm.round.f32(float %arg0)
443 define float @ret_round_nopos(float nofpclass(pinf psub pnorm) %arg0) {
444 ; CHECK-LABEL: define nofpclass(pinf sub) float @ret_round_nopos
445 ; CHECK-SAME: (float nofpclass(pinf psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
446 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.round.f32(float nofpclass(pinf psub pnorm) [[ARG0]]) #[[ATTR2]]
447 ; CHECK-NEXT: ret float [[CALL]]
449 ; LIGHT-LABEL: define float @ret_round_nopos
450 ; LIGHT-SAME: (float nofpclass(pinf psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
451 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(pinf psub pnorm) [[ARG0]]) #[[ATTR2]]
452 ; LIGHT-NEXT: ret float [[CALL]]
454 %call = call float @llvm.round.f32(float %arg0)
458 define float @ret_round_nopos_nopzero(float nofpclass(pinf psub pnorm pzero) %arg0) {
459 ; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_round_nopos_nopzero
460 ; CHECK-SAME: (float nofpclass(pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
461 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.round.f32(float nofpclass(pinf pzero psub pnorm) [[ARG0]]) #[[ATTR2]]
462 ; CHECK-NEXT: ret float [[CALL]]
464 ; LIGHT-LABEL: define float @ret_round_nopos_nopzero
465 ; LIGHT-SAME: (float nofpclass(pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
466 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(pinf pzero psub pnorm) [[ARG0]]) #[[ATTR2]]
467 ; LIGHT-NEXT: ret float [[CALL]]
469 %call = call float @llvm.round.f32(float %arg0)
473 define float @ret_round_nopos_nopzero_nonan(float nofpclass(pinf psub pnorm pzero nan) %arg0) {
474 ; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_round_nopos_nopzero_nonan
475 ; CHECK-SAME: (float nofpclass(nan pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
476 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.round.f32(float nofpclass(nan pinf pzero psub pnorm) [[ARG0]]) #[[ATTR2]]
477 ; CHECK-NEXT: ret float [[CALL]]
479 ; LIGHT-LABEL: define float @ret_round_nopos_nopzero_nonan
480 ; LIGHT-SAME: (float nofpclass(nan pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
481 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(nan pinf pzero psub pnorm) [[ARG0]]) #[[ATTR2]]
482 ; LIGHT-NEXT: ret float [[CALL]]
484 %call = call float @llvm.round.f32(float %arg0)
488 define float @ret_round_nopos_nozero(float nofpclass(pinf psub pnorm zero) %arg0) {
489 ; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_round_nopos_nozero
490 ; CHECK-SAME: (float nofpclass(pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
491 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.round.f32(float nofpclass(pinf zero psub pnorm) [[ARG0]]) #[[ATTR2]]
492 ; CHECK-NEXT: ret float [[CALL]]
494 ; LIGHT-LABEL: define float @ret_round_nopos_nozero
495 ; LIGHT-SAME: (float nofpclass(pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
496 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(pinf zero psub pnorm) [[ARG0]]) #[[ATTR2]]
497 ; LIGHT-NEXT: ret float [[CALL]]
499 %call = call float @llvm.round.f32(float %arg0)
503 define float @ret_round_nopos_nozero_nonan(float nofpclass(pinf psub pnorm zero nan) %arg0) {
504 ; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_round_nopos_nozero_nonan
505 ; CHECK-SAME: (float nofpclass(nan pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
506 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.round.f32(float nofpclass(nan pinf zero psub pnorm) [[ARG0]]) #[[ATTR2]]
507 ; CHECK-NEXT: ret float [[CALL]]
509 ; LIGHT-LABEL: define float @ret_round_nopos_nozero_nonan
510 ; LIGHT-SAME: (float nofpclass(nan pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
511 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(nan pinf zero psub pnorm) [[ARG0]]) #[[ATTR2]]
512 ; LIGHT-NEXT: ret float [[CALL]]
514 %call = call float @llvm.round.f32(float %arg0)
518 define float @ret_round_nopzero_nopnorm(float nofpclass(pzero pnorm) %arg0) {
519 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopzero_nopnorm
520 ; CHECK-SAME: (float nofpclass(pzero pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
521 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(pzero pnorm) [[ARG0]]) #[[ATTR2]]
522 ; CHECK-NEXT: ret float [[CALL]]
524 ; LIGHT-LABEL: define float @ret_round_nopzero_nopnorm
525 ; LIGHT-SAME: (float nofpclass(pzero pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
526 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(pzero pnorm) [[ARG0]]) #[[ATTR2]]
527 ; LIGHT-NEXT: ret float [[CALL]]
529 %call = call float @llvm.round.f32(float %arg0)
533 define float @ret_round_nonzero_nonnorm(float nofpclass(nzero nnorm) %arg0) {
534 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonzero_nonnorm
535 ; CHECK-SAME: (float nofpclass(nzero nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
536 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(nzero nnorm) [[ARG0]]) #[[ATTR2]]
537 ; CHECK-NEXT: ret float [[CALL]]
539 ; LIGHT-LABEL: define float @ret_round_nonzero_nonnorm
540 ; LIGHT-SAME: (float nofpclass(nzero nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
541 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(nzero nnorm) [[ARG0]]) #[[ATTR2]]
542 ; LIGHT-NEXT: ret float [[CALL]]
544 %call = call float @llvm.round.f32(float %arg0)
548 define float @ret_round_nozero_nonorm(float nofpclass(zero norm) %arg0) {
549 ; CHECK-LABEL: define nofpclass(sub) float @ret_round_nozero_nonorm
550 ; CHECK-SAME: (float nofpclass(zero norm) [[ARG0:%.*]]) #[[ATTR1]] {
551 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float nofpclass(zero norm) [[ARG0]]) #[[ATTR2]]
552 ; CHECK-NEXT: ret float [[CALL]]
554 ; LIGHT-LABEL: define float @ret_round_nozero_nonorm
555 ; LIGHT-SAME: (float nofpclass(zero norm) [[ARG0:%.*]]) #[[ATTR1]] {
556 ; LIGHT-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float nofpclass(zero norm) [[ARG0]]) #[[ATTR2]]
557 ; LIGHT-NEXT: ret float [[CALL]]
559 %call = call float @llvm.round.f32(float %arg0)