Matt Arsenault | 308a97f | 2022-12-06 13:04:15 -0500 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | llvm-dis | FileCheck %s |
| 2 | |
| 3 | ; All fields with integer syntax |
| 4 | define void @nofpclass_1023(float nofpclass(1023) %x) { |
| 5 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_1023 |
| 6 | ; CHECK-SAME: (float nofpclass(all) [[X:%.*]]) { |
| 7 | ; CHECK-NEXT: ret void |
| 8 | ; |
| 9 | ret void |
| 10 | } |
| 11 | |
| 12 | ; -------------------------------------------------------------------- |
| 13 | ; Single field, integer syntax |
| 14 | ; -------------------------------------------------------------------- |
| 15 | |
| 16 | define void @nofpclass_1(float nofpclass(1) %x) { |
| 17 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_1 |
| 18 | ; CHECK-SAME: (float nofpclass(snan) [[X:%.*]]) { |
| 19 | ; CHECK-NEXT: ret void |
| 20 | ; |
| 21 | ret void |
| 22 | } |
| 23 | |
| 24 | define void @nofpclass_2(float nofpclass(2) %x) { |
| 25 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_2 |
| 26 | ; CHECK-SAME: (float nofpclass(qnan) [[X:%.*]]) { |
| 27 | ; CHECK-NEXT: ret void |
| 28 | ; |
| 29 | ret void |
| 30 | } |
| 31 | |
| 32 | define void @nofpclass_3(float nofpclass(4) %x) { |
| 33 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_3 |
| 34 | ; CHECK-SAME: (float nofpclass(ninf) [[X:%.*]]) { |
| 35 | ; CHECK-NEXT: ret void |
| 36 | ; |
| 37 | ret void |
| 38 | } |
| 39 | |
| 40 | define void @nofpclass_8(float nofpclass(8) %x) { |
| 41 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_8 |
| 42 | ; CHECK-SAME: (float nofpclass(nnorm) [[X:%.*]]) { |
| 43 | ; CHECK-NEXT: ret void |
| 44 | ; |
| 45 | ret void |
| 46 | } |
| 47 | |
| 48 | define void @nofpclass_16(float nofpclass(16) %x) { |
| 49 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_16 |
| 50 | ; CHECK-SAME: (float nofpclass(nsub) [[X:%.*]]) { |
| 51 | ; CHECK-NEXT: ret void |
| 52 | ; |
| 53 | ret void |
| 54 | } |
| 55 | |
| 56 | define void @nofpclass_32(float nofpclass(32) %x) { |
| 57 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_32 |
| 58 | ; CHECK-SAME: (float nofpclass(nzero) [[X:%.*]]) { |
| 59 | ; CHECK-NEXT: ret void |
| 60 | ; |
| 61 | ret void |
| 62 | } |
| 63 | |
| 64 | define void @nofpclass_64(float nofpclass(64) %x) { |
| 65 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_64 |
| 66 | ; CHECK-SAME: (float nofpclass(pzero) [[X:%.*]]) { |
| 67 | ; CHECK-NEXT: ret void |
| 68 | ; |
| 69 | ret void |
| 70 | } |
| 71 | |
| 72 | define void @nofpclass_128(float nofpclass(128) %x) { |
| 73 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_128 |
| 74 | ; CHECK-SAME: (float nofpclass(psub) [[X:%.*]]) { |
| 75 | ; CHECK-NEXT: ret void |
| 76 | ; |
| 77 | ret void |
| 78 | } |
| 79 | |
| 80 | define void @nofpclass_256(float nofpclass(256) %x) { |
| 81 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_256 |
| 82 | ; CHECK-SAME: (float nofpclass(pnorm) [[X:%.*]]) { |
| 83 | ; CHECK-NEXT: ret void |
| 84 | ; |
| 85 | ret void |
| 86 | } |
| 87 | |
| 88 | define void @nofpclass_512(float nofpclass(512) %x) { |
| 89 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_512 |
| 90 | ; CHECK-SAME: (float nofpclass(pinf) [[X:%.*]]) { |
| 91 | ; CHECK-NEXT: ret void |
| 92 | ; |
| 93 | ret void |
| 94 | } |
| 95 | |
| 96 | define void @nofpclass_8_extra_space(float nofpclass( 8 ) %x) { |
| 97 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_8_extra_space |
| 98 | ; CHECK-SAME: (float nofpclass(nnorm) [[X:%.*]]) { |
| 99 | ; CHECK-NEXT: ret void |
| 100 | ; |
| 101 | ret void |
| 102 | } |
| 103 | |
| 104 | ; -------------------------------------------------------------------- |
| 105 | ; Canonical single field names |
| 106 | ; -------------------------------------------------------------------- |
| 107 | |
| 108 | define void @nofpclass_snan(float nofpclass(snan) %x) { |
| 109 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_snan |
| 110 | ; CHECK-SAME: (float nofpclass(snan) [[X:%.*]]) { |
| 111 | ; CHECK-NEXT: ret void |
| 112 | ; |
| 113 | ret void |
| 114 | } |
| 115 | |
| 116 | define void @nofpclass_qnan(float nofpclass(qnan) %x) { |
| 117 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_qnan |
| 118 | ; CHECK-SAME: (float nofpclass(qnan) [[X:%.*]]) { |
| 119 | ; CHECK-NEXT: ret void |
| 120 | ; |
| 121 | ret void |
| 122 | } |
| 123 | |
| 124 | define void @nofpclass_ninf(float nofpclass(ninf) %x) { |
| 125 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_ninf |
| 126 | ; CHECK-SAME: (float nofpclass(ninf) [[X:%.*]]) { |
| 127 | ; CHECK-NEXT: ret void |
| 128 | ; |
| 129 | ret void |
| 130 | } |
| 131 | |
| 132 | define void @nofpclass_nnorm(float nofpclass(nnorm) %x) { |
| 133 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nnorm |
| 134 | ; CHECK-SAME: (float nofpclass(nnorm) [[X:%.*]]) { |
| 135 | ; CHECK-NEXT: ret void |
| 136 | ; |
| 137 | ret void |
| 138 | } |
| 139 | |
| 140 | define void @nofpclass_nsub(float nofpclass(nsub) %x) { |
| 141 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nsub |
| 142 | ; CHECK-SAME: (float nofpclass(nsub) [[X:%.*]]) { |
| 143 | ; CHECK-NEXT: ret void |
| 144 | ; |
| 145 | ret void |
| 146 | } |
| 147 | |
| 148 | define void @nofpclass_nzero(float nofpclass(nzero) %x) { |
| 149 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nzero |
| 150 | ; CHECK-SAME: (float nofpclass(nzero) [[X:%.*]]) { |
| 151 | ; CHECK-NEXT: ret void |
| 152 | ; |
| 153 | ret void |
| 154 | } |
| 155 | |
| 156 | define void @nofpclass_pzero(float nofpclass(pzero) %x) { |
| 157 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_pzero |
| 158 | ; CHECK-SAME: (float nofpclass(pzero) [[X:%.*]]) { |
| 159 | ; CHECK-NEXT: ret void |
| 160 | ; |
| 161 | ret void |
| 162 | } |
| 163 | |
| 164 | define void @nofpclass_psub(float nofpclass(psub) %x) { |
| 165 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_psub |
| 166 | ; CHECK-SAME: (float nofpclass(psub) [[X:%.*]]) { |
| 167 | ; CHECK-NEXT: ret void |
| 168 | ; |
| 169 | ret void |
| 170 | } |
| 171 | |
| 172 | define void @nofpclass_pnorm(float nofpclass(pnorm) %x) { |
| 173 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_pnorm |
| 174 | ; CHECK-SAME: (float nofpclass(pnorm) [[X:%.*]]) { |
| 175 | ; CHECK-NEXT: ret void |
| 176 | ; |
| 177 | ret void |
| 178 | } |
| 179 | |
| 180 | define void @nofpclass_pinf(float nofpclass(pinf) %x) { |
| 181 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_pinf |
| 182 | ; CHECK-SAME: (float nofpclass(pinf) [[X:%.*]]) { |
| 183 | ; CHECK-NEXT: ret void |
| 184 | ; |
| 185 | ret void |
| 186 | } |
| 187 | |
| 188 | ; -------------------------------------------------------------------- |
| 189 | ; Pretty printed pairs |
| 190 | ; -------------------------------------------------------------------- |
| 191 | |
| 192 | define void @nofpclass_nan(float nofpclass(nan) %x) { |
| 193 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nan |
| 194 | ; CHECK-SAME: (float nofpclass(nan) [[X:%.*]]) { |
| 195 | ; CHECK-NEXT: ret void |
| 196 | ; |
| 197 | ret void |
| 198 | } |
| 199 | |
| 200 | define void @nofpclass_inf(float nofpclass(inf) %x) { |
| 201 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_inf |
| 202 | ; CHECK-SAME: (float nofpclass(inf) [[X:%.*]]) { |
| 203 | ; CHECK-NEXT: ret void |
| 204 | ; |
| 205 | ret void |
| 206 | } |
| 207 | |
| 208 | define void @nofpclass_norm(float nofpclass(norm) %x) { |
| 209 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_norm |
| 210 | ; CHECK-SAME: (float nofpclass(norm) [[X:%.*]]) { |
| 211 | ; CHECK-NEXT: ret void |
| 212 | ; |
| 213 | ret void |
| 214 | } |
| 215 | |
| 216 | define void @nofpclass_sub(float nofpclass(sub) %x) { |
| 217 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_sub |
| 218 | ; CHECK-SAME: (float nofpclass(sub) [[X:%.*]]) { |
| 219 | ; CHECK-NEXT: ret void |
| 220 | ; |
| 221 | ret void |
| 222 | } |
| 223 | |
| 224 | define void @nofpclass_zero(float nofpclass(zero) %x) { |
| 225 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_zero |
| 226 | ; CHECK-SAME: (float nofpclass(zero) [[X:%.*]]) { |
| 227 | ; CHECK-NEXT: ret void |
| 228 | ; |
| 229 | ret void |
| 230 | } |
| 231 | |
| 232 | ; -------------------------------------------------------------------- |
| 233 | ; Special helper names |
| 234 | ; -------------------------------------------------------------------- |
| 235 | |
| 236 | define void @nofpclass_all(float nofpclass(all) %x) { |
| 237 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_all |
| 238 | ; CHECK-SAME: (float nofpclass(all) [[X:%.*]]) { |
| 239 | ; CHECK-NEXT: ret void |
| 240 | ; |
| 241 | ret void |
| 242 | } |
| 243 | |
| 244 | ; -------------------------------------------------------------------- |
| 245 | ; Return position |
| 246 | ; -------------------------------------------------------------------- |
| 247 | |
| 248 | define nofpclass(nan) float @return_nan(float %arg) { |
| 249 | ; CHECK-LABEL: define {{[^@]+}}@return_nan |
| 250 | ; CHECK-SAME: (float [[ARG:%.*]]) { |
| 251 | ; CHECK-NEXT: ret float [[ARG]] |
| 252 | ; |
| 253 | ret float %arg |
| 254 | } |
| 255 | |
| 256 | ; -------------------------------------------------------------------- |
| 257 | ; Callsite positions |
| 258 | ; -------------------------------------------------------------------- |
| 259 | |
| 260 | declare float @func(float) |
| 261 | |
| 262 | define float @callsite_nofpclass_arg(float %arg) { |
| 263 | ; CHECK-LABEL: define {{[^@]+}}@callsite_nofpclass_arg |
| 264 | ; CHECK-SAME: (float [[ARG:%.*]]) { |
| 265 | ; CHECK-NEXT: [[CALL:%.*]] = call float @func(float nofpclass(nan) [[ARG]]) |
| 266 | ; CHECK-NEXT: ret float [[CALL]] |
| 267 | ; |
| 268 | %call = call float @func(float nofpclass(nan) %arg) |
| 269 | ret float %call |
| 270 | } |
| 271 | |
| 272 | define float @callsite_nofpclass_return(float %arg) { |
| 273 | ; CHECK-LABEL: define {{[^@]+}}@callsite_nofpclass_return |
| 274 | ; CHECK-SAME: (float [[ARG:%.*]]) { |
| 275 | ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @func(float [[ARG]]) |
| 276 | ; CHECK-NEXT: ret float [[CALL]] |
| 277 | ; |
| 278 | %call = call nofpclass(nan) float @func(float %arg) |
| 279 | ret float %call |
| 280 | } |
| 281 | |
| 282 | ; -------------------------------------------------------------------- |
| 283 | ; Declaration |
| 284 | ; -------------------------------------------------------------------- |
| 285 | |
| 286 | declare nofpclass(inf) float @declaration(float nofpclass(zero)) |
| 287 | |
| 288 | ; -------------------------------------------------------------------- |
| 289 | ; Combinations of named values |
| 290 | ; -------------------------------------------------------------------- |
| 291 | |
| 292 | define void @nofpclass_nan_inf(float nofpclass(nan inf) %x) { |
| 293 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nan_inf |
| 294 | ; CHECK-SAME: (float nofpclass(nan inf) [[X:%.*]]) { |
| 295 | ; CHECK-NEXT: ret void |
| 296 | ; |
| 297 | ret void |
| 298 | } |
| 299 | |
| 300 | define void @nofpclass_inf_nan(float nofpclass(inf nan) %x) { |
| 301 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_inf_nan |
| 302 | ; CHECK-SAME: (float nofpclass(nan inf) [[X:%.*]]) { |
| 303 | ; CHECK-NEXT: ret void |
| 304 | ; |
| 305 | ret void |
| 306 | } |
| 307 | |
| 308 | define void @nofpclass_nan_qnan_snan(float nofpclass(nan qnan snan) %x) { |
| 309 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nan_qnan_snan |
| 310 | ; CHECK-SAME: (float nofpclass(nan) [[X:%.*]]) { |
| 311 | ; CHECK-NEXT: ret void |
| 312 | ; |
| 313 | ret void |
| 314 | } |
| 315 | |
| 316 | define void @nofpclass_snan_qnan_nan(float nofpclass(snan qnan nan) %x) { |
| 317 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_snan_qnan_nan |
| 318 | ; CHECK-SAME: (float nofpclass(nan) [[X:%.*]]) { |
| 319 | ; CHECK-NEXT: ret void |
| 320 | ; |
| 321 | ret void |
| 322 | } |
| 323 | |
| 324 | define void @nofpclass_all_pairs_named(float nofpclass(nan inf norm sub zero) %x) { |
| 325 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_all_pairs_named |
| 326 | ; CHECK-SAME: (float nofpclass(all) [[X:%.*]]) { |
| 327 | ; CHECK-NEXT: ret void |
| 328 | ; |
| 329 | ret void |
| 330 | } |
| 331 | |
| 332 | define void @nofpclass_all_pairs_named_reverse(float nofpclass(zero sub norm inf nan) %x) { |
| 333 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_all_pairs_named_reverse |
| 334 | ; CHECK-SAME: (float nofpclass(all) [[X:%.*]]) { |
| 335 | ; CHECK-NEXT: ret void |
| 336 | ; |
| 337 | ret void |
| 338 | } |
| 339 | |
| 340 | define void @nofpclass_all_pairs_named_shuffle0(float nofpclass(sub nan norm zero inf) %x) { |
| 341 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_all_pairs_named_shuffle0 |
| 342 | ; CHECK-SAME: (float nofpclass(all) [[X:%.*]]) { |
| 343 | ; CHECK-NEXT: ret void |
| 344 | ; |
| 345 | ret void |
| 346 | } |
| 347 | |
| 348 | define void @nofpclass_all_fields_named(float nofpclass(snan qnan ninf pinf nnorm pnorm nsub psub nzero pzero) %x) { |
| 349 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_all_fields_named |
| 350 | ; CHECK-SAME: (float nofpclass(all) [[X:%.*]]) { |
| 351 | ; CHECK-NEXT: ret void |
| 352 | ; |
| 353 | ret void |
| 354 | } |
| 355 | |
| 356 | define void @nofpclass_all_fields_named_reverse(float nofpclass(pzero nzero psub nsub pnorm nnorm pinf ninf qnan snan) %x) { |
| 357 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_all_fields_named_reverse |
| 358 | ; CHECK-SAME: (float nofpclass(all) [[X:%.*]]) { |
| 359 | ; CHECK-NEXT: ret void |
| 360 | ; |
| 361 | ret void |
| 362 | } |
| 363 | |
| 364 | define void @nofpclass_snan_ninf(float nofpclass(snan ninf) %x) { |
| 365 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_snan_ninf |
| 366 | ; CHECK-SAME: (float nofpclass(snan ninf) [[X:%.*]]) { |
| 367 | ; CHECK-NEXT: ret void |
| 368 | ; |
| 369 | ret void |
| 370 | } |
| 371 | |
| 372 | define void @nofpclass_ninf_snan(float nofpclass(ninf snan) %x) { |
| 373 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_ninf_snan |
| 374 | ; CHECK-SAME: (float nofpclass(snan ninf) [[X:%.*]]) { |
| 375 | ; CHECK-NEXT: ret void |
| 376 | ; |
| 377 | ret void |
| 378 | } |
| 379 | |
| 380 | ; -------------------------------------------------------------------- |
| 381 | ; Supported IR types |
| 382 | ; -------------------------------------------------------------------- |
| 383 | |
| 384 | ; Vector FP |
| 385 | define void @nofpclass_nan_inf_v2f16(<2 x half> nofpclass(nan inf) %x) { |
| 386 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nan_inf_v2f16 |
| 387 | ; CHECK-SAME: (<2 x half> nofpclass(nan inf) [[X:%.*]]) { |
| 388 | ; CHECK-NEXT: ret void |
| 389 | ; |
| 390 | ret void |
| 391 | } |
| 392 | |
| 393 | ; Scalable Vector FP |
| 394 | define void @nofpclass_nan_inf_scalable_v2f16(<vscale x 2 x half> nofpclass(nan inf) %x) { |
| 395 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nan_inf_scalable_v2f16 |
| 396 | ; CHECK-SAME: (<vscale x 2 x half> nofpclass(nan inf) [[X:%.*]]) { |
| 397 | ; CHECK-NEXT: ret void |
| 398 | ; |
| 399 | ret void |
| 400 | } |
| 401 | |
| 402 | ; Array of scalar FP |
| 403 | define void @nofpclass_nan_inf_a4f64([4 x double] nofpclass(nan inf) %x) { |
| 404 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nan_inf_a4f64 |
| 405 | ; CHECK-SAME: ([4 x double] nofpclass(nan inf) [[X:%.*]]) { |
| 406 | ; CHECK-NEXT: ret void |
| 407 | ; |
| 408 | ret void |
| 409 | } |
| 410 | |
| 411 | ; Array of vector FP |
| 412 | define void @nofpclass_nan_inf_a4v2f16([4 x <2 x half>] nofpclass(nan inf) %x) { |
| 413 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nan_inf_a4v2f16 |
| 414 | ; CHECK-SAME: ([4 x <2 x half>] nofpclass(nan inf) [[X:%.*]]) { |
| 415 | ; CHECK-NEXT: ret void |
| 416 | ; |
| 417 | ret void |
| 418 | } |
| 419 | |
| 420 | ; Array of array of scalar FP |
| 421 | define void @nofpclass_nan_inf_a8a4f32([8 x [4 x float]] nofpclass(nan inf) %x) { |
| 422 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nan_inf_a8a4f32 |
| 423 | ; CHECK-SAME: ([8 x [4 x float]] nofpclass(nan inf) [[X:%.*]]) { |
| 424 | ; CHECK-NEXT: ret void |
| 425 | ; |
| 426 | ret void |
| 427 | } |
| 428 | |
| 429 | ; Array of array of vector FP |
| 430 | define void @nofpclass_nan_inf_a8a4v2f32([8 x [4 x <2 x float>]] nofpclass(nan inf) %x) { |
| 431 | ; CHECK-LABEL: define {{[^@]+}}@nofpclass_nan_inf_a8a4v2f32 |
| 432 | ; CHECK-SAME: ([8 x [4 x <2 x float>]] nofpclass(nan inf) [[X:%.*]]) { |
| 433 | ; CHECK-NEXT: ret void |
| 434 | ; |
| 435 | ret void |
| 436 | } |