OLD | NEW |
1 target triple = "i686-pc-linux-gnu" | 1 target triple = "i686-pc-linux-gnu" |
2 | 2 |
3 ; This file is extracted from fp.pnacl.ll in the lit tests, with | 3 ; This file is extracted from fp.pnacl.ll and vector-fcmp.ll in the lit |
4 ; the "internal" attribute removed from the functions. | 4 ; tests, with the "internal" attribute removed from the functions. |
5 | 5 |
6 define i32 @fcmpFalseFloat(float %a, float %b) { | 6 define i32 @fcmpFalseFloat(float %a, float %b) { |
7 entry: | 7 entry: |
8 %cmp = fcmp false float %a, %b | 8 %cmp = fcmp false float %a, %b |
9 %cmp.ret_ext = zext i1 %cmp to i32 | 9 %cmp.ret_ext = zext i1 %cmp to i32 |
10 ret i32 %cmp.ret_ext | 10 ret i32 %cmp.ret_ext |
11 } | 11 } |
12 ; CHECK: fcmpFalseFloat: | 12 ; CHECK: fcmpFalseFloat: |
13 ; CHECK: mov {{.*}}, 0 | 13 ; CHECK: mov {{.*}}, 0 |
14 | 14 |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 ; CHECK: mov {{.*}}, 1 | 315 ; CHECK: mov {{.*}}, 1 |
316 | 316 |
317 define i32 @fcmpTrueDouble(double %a, double %b) { | 317 define i32 @fcmpTrueDouble(double %a, double %b) { |
318 entry: | 318 entry: |
319 %cmp = fcmp true double %a, %b | 319 %cmp = fcmp true double %a, %b |
320 %cmp.ret_ext = zext i1 %cmp to i32 | 320 %cmp.ret_ext = zext i1 %cmp to i32 |
321 ret i32 %cmp.ret_ext | 321 ret i32 %cmp.ret_ext |
322 } | 322 } |
323 ; CHECK: fcmpTrueDouble: | 323 ; CHECK: fcmpTrueDouble: |
324 ; CHECK: mov {{.*}}, 1 | 324 ; CHECK: mov {{.*}}, 1 |
| 325 |
| 326 define <4 x i32> @fcmpFalseVector(<4 x float> %a, <4 x float> %b) { |
| 327 entry: |
| 328 %res.trunc = fcmp false <4 x float> %a, %b |
| 329 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 330 ret <4 x i32> %res |
| 331 ; CHECK-LABEL: fcmpFalseVector: |
| 332 ; CHECK: pxor |
| 333 } |
| 334 |
| 335 define <4 x i32> @fcmpOeqVector(<4 x float> %a, <4 x float> %b) { |
| 336 entry: |
| 337 %res.trunc = fcmp oeq <4 x float> %a, %b |
| 338 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 339 ret <4 x i32> %res |
| 340 ; CHECK-LABEL: fcmpOeqVector: |
| 341 ; CHECK: cmpeqps |
| 342 } |
| 343 |
| 344 define <4 x i32> @fcmpOgeVector(<4 x float> %a, <4 x float> %b) { |
| 345 entry: |
| 346 %res.trunc = fcmp oge <4 x float> %a, %b |
| 347 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 348 ret <4 x i32> %res |
| 349 ; CHECK-LABEL: fcmpOgeVector: |
| 350 ; CHECK: cmpleps |
| 351 } |
| 352 |
| 353 define <4 x i32> @fcmpOgtVector(<4 x float> %a, <4 x float> %b) { |
| 354 entry: |
| 355 %res.trunc = fcmp ogt <4 x float> %a, %b |
| 356 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 357 ret <4 x i32> %res |
| 358 ; CHECK-LABEL: fcmpOgtVector: |
| 359 ; CHECK: cmpltps |
| 360 } |
| 361 |
| 362 define <4 x i32> @fcmpOleVector(<4 x float> %a, <4 x float> %b) { |
| 363 entry: |
| 364 %res.trunc = fcmp ole <4 x float> %a, %b |
| 365 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 366 ret <4 x i32> %res |
| 367 ; CHECK-LABEL: fcmpOleVector: |
| 368 ; CHECK: cmpleps |
| 369 } |
| 370 |
| 371 define <4 x i32> @fcmpOltVector(<4 x float> %a, <4 x float> %b) { |
| 372 entry: |
| 373 %res.trunc = fcmp olt <4 x float> %a, %b |
| 374 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 375 ret <4 x i32> %res |
| 376 ; CHECK-LABEL: fcmpOltVector: |
| 377 ; CHECK: cmpltps |
| 378 } |
| 379 |
| 380 define <4 x i32> @fcmpOneVector(<4 x float> %a, <4 x float> %b) { |
| 381 entry: |
| 382 %res.trunc = fcmp one <4 x float> %a, %b |
| 383 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 384 ret <4 x i32> %res |
| 385 ; CHECK-LABEL: fcmpOneVector: |
| 386 ; CHECK: cmpneqps |
| 387 ; CHECK: cmpordps |
| 388 ; CHECK: pand |
| 389 } |
| 390 |
| 391 define <4 x i32> @fcmpOrdVector(<4 x float> %a, <4 x float> %b) { |
| 392 entry: |
| 393 %res.trunc = fcmp ord <4 x float> %a, %b |
| 394 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 395 ret <4 x i32> %res |
| 396 ; CHECK-LABEL: fcmpOrdVector: |
| 397 ; CHECK: cmpordps |
| 398 } |
| 399 |
| 400 define <4 x i32> @fcmpTrueVector(<4 x float> %a, <4 x float> %b) { |
| 401 entry: |
| 402 %res.trunc = fcmp true <4 x float> %a, %b |
| 403 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 404 ret <4 x i32> %res |
| 405 ; CHECK-LABEL: fcmpTrueVector: |
| 406 ; CHECK: pcmpeqd |
| 407 } |
| 408 |
| 409 define <4 x i32> @fcmpUeqVector(<4 x float> %a, <4 x float> %b) { |
| 410 entry: |
| 411 %res.trunc = fcmp ueq <4 x float> %a, %b |
| 412 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 413 ret <4 x i32> %res |
| 414 ; CHECK-LABEL: fcmpUeqVector: |
| 415 ; CHECK: cmpeqps |
| 416 ; CHECK: cmpunordps |
| 417 ; CHECK: por |
| 418 } |
| 419 |
| 420 define <4 x i32> @fcmpUgeVector(<4 x float> %a, <4 x float> %b) { |
| 421 entry: |
| 422 %res.trunc = fcmp uge <4 x float> %a, %b |
| 423 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 424 ret <4 x i32> %res |
| 425 ; CHECK-LABEL: fcmpUgeVector: |
| 426 ; CHECK: cmpnltps |
| 427 } |
| 428 |
| 429 define <4 x i32> @fcmpUgtVector(<4 x float> %a, <4 x float> %b) { |
| 430 entry: |
| 431 %res.trunc = fcmp ugt <4 x float> %a, %b |
| 432 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 433 ret <4 x i32> %res |
| 434 ; CHECK-LABEL: fcmpUgtVector: |
| 435 ; CHECK: cmpnleps |
| 436 } |
| 437 |
| 438 define <4 x i32> @fcmpUleVector(<4 x float> %a, <4 x float> %b) { |
| 439 entry: |
| 440 %res.trunc = fcmp ule <4 x float> %a, %b |
| 441 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 442 ret <4 x i32> %res |
| 443 ; CHECK-LABEL: fcmpUleVector: |
| 444 ; CHECK: cmpnltps |
| 445 } |
| 446 |
| 447 define <4 x i32> @fcmpUltVector(<4 x float> %a, <4 x float> %b) { |
| 448 entry: |
| 449 %res.trunc = fcmp ult <4 x float> %a, %b |
| 450 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 451 ret <4 x i32> %res |
| 452 ; CHECK-LABEL: fcmpUltVector: |
| 453 ; CHECK: cmpnleps |
| 454 } |
| 455 |
| 456 define <4 x i32> @fcmpUneVector(<4 x float> %a, <4 x float> %b) { |
| 457 entry: |
| 458 %res.trunc = fcmp une <4 x float> %a, %b |
| 459 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 460 ret <4 x i32> %res |
| 461 ; CHECK-LABEL: fcmpUneVector: |
| 462 ; CHECK: cmpneqps |
| 463 } |
| 464 |
| 465 define <4 x i32> @fcmpUnoVector(<4 x float> %a, <4 x float> %b) { |
| 466 entry: |
| 467 %res.trunc = fcmp uno <4 x float> %a, %b |
| 468 %res = sext <4 x i1> %res.trunc to <4 x i32> |
| 469 ret <4 x i32> %res |
| 470 ; CHECK-LABEL: fcmpUnoVector: |
| 471 ; CHECK: cmpunordps |
| 472 } |
OLD | NEW |