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,TUNIT
4 declare float @llvm.trunc.f32(float)
5 declare ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128)
7 define float @ret_trunc(float %arg0) {
8 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc
9 ; CHECK-SAME: (float nofpclass(sub) [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] {
10 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]]
11 ; CHECK-NEXT: ret float [[CALL]]
13 %call = call float @llvm.trunc.f32(float %arg0)
17 define float @ret_trunc_noinf(float nofpclass(inf) %arg0) {
18 ; CHECK-LABEL: define nofpclass(inf sub) float @ret_trunc_noinf
19 ; CHECK-SAME: (float nofpclass(inf sub) [[ARG0:%.*]]) #[[ATTR1]] {
20 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
21 ; CHECK-NEXT: ret float [[CALL]]
23 %call = call float @llvm.trunc.f32(float %arg0)
27 define float @ret_trunc_nopinf(float nofpclass(pinf) %arg0) {
28 ; CHECK-LABEL: define nofpclass(pinf sub) float @ret_trunc_nopinf
29 ; CHECK-SAME: (float nofpclass(pinf sub) [[ARG0:%.*]]) #[[ATTR1]] {
30 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
31 ; CHECK-NEXT: ret float [[CALL]]
33 %call = call float @llvm.trunc.f32(float %arg0)
37 define float @ret_trunc_noninf(float nofpclass(ninf) %arg0) {
38 ; CHECK-LABEL: define nofpclass(ninf sub) float @ret_trunc_noninf
39 ; CHECK-SAME: (float nofpclass(ninf sub) [[ARG0:%.*]]) #[[ATTR1]] {
40 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
41 ; CHECK-NEXT: ret float [[CALL]]
43 %call = call float @llvm.trunc.f32(float %arg0)
47 define float @ret_trunc_nonan(float nofpclass(nan) %arg0) {
48 ; CHECK-LABEL: define nofpclass(nan sub) float @ret_trunc_nonan
49 ; CHECK-SAME: (float nofpclass(nan sub) [[ARG0:%.*]]) #[[ATTR1]] {
50 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
51 ; CHECK-NEXT: ret float [[CALL]]
53 %call = call float @llvm.trunc.f32(float %arg0)
57 define float @ret_trunc_noqnan(float nofpclass(qnan) %arg0) {
58 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_noqnan
59 ; CHECK-SAME: (float nofpclass(qnan sub) [[ARG0:%.*]]) #[[ATTR1]] {
60 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
61 ; CHECK-NEXT: ret float [[CALL]]
63 %call = call float @llvm.trunc.f32(float %arg0)
67 define float @ret_trunc_nosnan(float nofpclass(snan) %arg0) {
68 ; CHECK-LABEL: define nofpclass(snan sub) float @ret_trunc_nosnan
69 ; CHECK-SAME: (float nofpclass(snan sub) [[ARG0:%.*]]) #[[ATTR1]] {
70 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
71 ; CHECK-NEXT: ret float [[CALL]]
73 %call = call float @llvm.trunc.f32(float %arg0)
77 define float @ret_trunc_nozero(float nofpclass(zero) %arg0) {
78 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nozero
79 ; CHECK-SAME: (float nofpclass(zero sub) [[ARG0:%.*]]) #[[ATTR1]] {
80 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
81 ; CHECK-NEXT: ret float [[CALL]]
83 %call = call float @llvm.trunc.f32(float %arg0)
87 define float @ret_trunc_nopzero(float nofpclass(pzero) %arg0) {
88 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopzero
89 ; CHECK-SAME: (float nofpclass(pzero sub) [[ARG0:%.*]]) #[[ATTR1]] {
90 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
91 ; CHECK-NEXT: ret float [[CALL]]
93 %call = call float @llvm.trunc.f32(float %arg0)
97 define float @ret_trunc_nonzero(float nofpclass(nzero) %arg0) {
98 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonzero
99 ; CHECK-SAME: (float nofpclass(nzero sub) [[ARG0:%.*]]) #[[ATTR1]] {
100 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
101 ; CHECK-NEXT: ret float [[CALL]]
103 %call = call float @llvm.trunc.f32(float %arg0)
107 define float @ret_trunc_nonorm(float nofpclass(norm) %arg0) {
108 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonorm
109 ; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] {
110 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
111 ; CHECK-NEXT: ret float [[CALL]]
113 %call = call float @llvm.trunc.f32(float %arg0)
117 define float @ret_trunc_nonnorm(float nofpclass(nnorm) %arg0) {
118 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonnorm
119 ; CHECK-SAME: (float nofpclass(sub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
120 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
121 ; CHECK-NEXT: ret float [[CALL]]
123 %call = call float @llvm.trunc.f32(float %arg0)
127 define float @ret_trunc_nopnorm(float nofpclass(pnorm) %arg0) {
128 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopnorm
129 ; CHECK-SAME: (float nofpclass(sub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
130 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
131 ; CHECK-NEXT: ret float [[CALL]]
133 %call = call float @llvm.trunc.f32(float %arg0)
137 define float @ret_trunc_nonsub(float nofpclass(nsub) %arg0) {
138 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonsub
139 ; CHECK-SAME: (float nofpclass(sub) [[ARG0:%.*]]) #[[ATTR1]] {
140 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
141 ; CHECK-NEXT: ret float [[CALL]]
143 %call = call float @llvm.trunc.f32(float %arg0)
147 define float @ret_trunc_nopsub(float nofpclass(psub) %arg0) {
148 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopsub
149 ; CHECK-SAME: (float nofpclass(sub) [[ARG0:%.*]]) #[[ATTR1]] {
150 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
151 ; CHECK-NEXT: ret float [[CALL]]
153 %call = call float @llvm.trunc.f32(float %arg0)
157 define float @ret_trunc_nonorm_nosub(float nofpclass(norm sub) %arg0) {
158 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonorm_nosub
159 ; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] {
160 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
161 ; CHECK-NEXT: ret float [[CALL]]
163 %call = call float @llvm.trunc.f32(float %arg0)
167 define float @ret_trunc_nopnorm_nopsub(float nofpclass(pnorm psub) %arg0) {
168 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopnorm_nopsub
169 ; CHECK-SAME: (float nofpclass(sub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
170 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
171 ; CHECK-NEXT: ret float [[CALL]]
173 %call = call float @llvm.trunc.f32(float %arg0)
177 define float @ret_trunc_nonnorm_nonsub(float nofpclass(nnorm nsub) %arg0) {
178 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonnorm_nonsub
179 ; CHECK-SAME: (float nofpclass(sub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
180 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
181 ; CHECK-NEXT: ret float [[CALL]]
183 %call = call float @llvm.trunc.f32(float %arg0)
187 define float @ret_trunc_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) {
188 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopnorm_nonsub
189 ; CHECK-SAME: (float nofpclass(sub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
190 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
191 ; CHECK-NEXT: ret float [[CALL]]
193 %call = call float @llvm.trunc.f32(float %arg0)
197 define ppc_fp128 @ret_trunc_ppcf128(ppc_fp128 %arg0) {
198 ; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_trunc_ppcf128
199 ; CHECK-SAME: (ppc_fp128 nofpclass(sub) [[ARG0:%.*]]) #[[ATTR1]] {
200 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
201 ; CHECK-NEXT: ret ppc_fp128 [[CALL]]
203 %call = call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %arg0)
207 define ppc_fp128 @ret_trunc_noinf_ppcf128(ppc_fp128 nofpclass(inf) %arg0) {
208 ; CHECK-LABEL: define nofpclass(inf sub) ppc_fp128 @ret_trunc_noinf_ppcf128
209 ; CHECK-SAME: (ppc_fp128 nofpclass(inf sub) [[ARG0:%.*]]) #[[ATTR1]] {
210 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf sub) ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
211 ; CHECK-NEXT: ret ppc_fp128 [[CALL]]
213 %call = call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %arg0)
217 define ppc_fp128 @ret_trunc_nopinf_ppcf128(ppc_fp128 nofpclass(pinf) %arg0) {
218 ; CHECK-LABEL: define nofpclass(pinf sub) ppc_fp128 @ret_trunc_nopinf_ppcf128
219 ; CHECK-SAME: (ppc_fp128 nofpclass(pinf sub) [[ARG0:%.*]]) #[[ATTR1]] {
220 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
221 ; CHECK-NEXT: ret ppc_fp128 [[CALL]]
223 %call = call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %arg0)
227 define ppc_fp128 @ret_trunc_noninf_ppcf128(ppc_fp128 nofpclass(ninf) %arg0) {
228 ; CHECK-LABEL: define nofpclass(ninf sub) ppc_fp128 @ret_trunc_noninf_ppcf128
229 ; CHECK-SAME: (ppc_fp128 nofpclass(ninf sub) [[ARG0:%.*]]) #[[ATTR1]] {
230 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
231 ; CHECK-NEXT: ret ppc_fp128 [[CALL]]
233 %call = call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %arg0)
237 define ppc_fp128 @ret_trunc_nonan_ppcf128(ppc_fp128 nofpclass(nan) %arg0) {
238 ; CHECK-LABEL: define nofpclass(nan sub) ppc_fp128 @ret_trunc_nonan_ppcf128
239 ; CHECK-SAME: (ppc_fp128 nofpclass(nan sub) [[ARG0:%.*]]) #[[ATTR1]] {
240 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
241 ; CHECK-NEXT: ret ppc_fp128 [[CALL]]
243 %call = call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %arg0)
247 define float @ret_trunc_nopzero_nopnorm(float nofpclass(pzero pnorm) %arg0) {
248 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopzero_nopnorm
249 ; CHECK-SAME: (float nofpclass(pzero sub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
250 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
251 ; CHECK-NEXT: ret float [[CALL]]
253 %call = call float @llvm.trunc.f32(float %arg0)
257 define float @ret_trunc_nonzero_nonnorm(float nofpclass(nzero nnorm) %arg0) {
258 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonzero_nonnorm
259 ; CHECK-SAME: (float nofpclass(nzero sub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
260 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
261 ; CHECK-NEXT: ret float [[CALL]]
263 %call = call float @llvm.trunc.f32(float %arg0)
267 define float @ret_trunc_nozero_nonorm(float nofpclass(zero norm) %arg0) {
268 ; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nozero_nonorm
269 ; CHECK-SAME: (float nofpclass(zero sub norm) [[ARG0:%.*]]) #[[ATTR1]] {
270 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
271 ; CHECK-NEXT: ret float [[CALL]]
273 %call = call float @llvm.trunc.f32(float %arg0)
277 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: