Commit b433a73
committed
[X86][SATCVT] Reduce MIN/MAXSS/D by conversion instruction result
CVTSD2SI returns INT_MIN/LONG_MIN when underflow happens.
VCVTPS/D2UD/QQ returns INT_MAX/LONG_MAX when overflow happens.
We can reduce one MIN/MAXSS/D instruction leveraging the result of the conversion instruction.
Partially fixes #1363421 parent 0a17427 commit b433a73
File tree
5 files changed
+635
-17
lines changed- llvm
- lib/Target/X86
- test/CodeGen/X86
5 files changed
+635
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21851 | 21851 | | |
21852 | 21852 | | |
21853 | 21853 | | |
| 21854 | + | |
| 21855 | + | |
| 21856 | + | |
| 21857 | + | |
| 21858 | + | |
| 21859 | + | |
| 21860 | + | |
| 21861 | + | |
| 21862 | + | |
21854 | 21863 | | |
21855 | 21864 | | |
21856 | 21865 | | |
| |||
21912 | 21921 | | |
21913 | 21922 | | |
21914 | 21923 | | |
21915 | | - | |
21916 | | - | |
21917 | | - | |
21918 | | - | |
21919 | | - | |
21920 | | - | |
| 21924 | + | |
| 21925 | + | |
| 21926 | + | |
| 21927 | + | |
| 21928 | + | |
| 21929 | + | |
| 21930 | + | |
| 21931 | + | |
| 21932 | + | |
| 21933 | + | |
| 21934 | + | |
21921 | 21935 | | |
21922 | | - | |
| 21936 | + | |
21923 | 21937 | | |
21924 | 21938 | | |
21925 | 21939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
621 | 620 | | |
622 | 621 | | |
623 | 622 | | |
624 | | - | |
625 | 623 | | |
626 | 624 | | |
627 | 625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1455 | 1455 | | |
1456 | 1456 | | |
1457 | 1457 | | |
1458 | | - | |
1459 | 1458 | | |
1460 | 1459 | | |
1461 | 1460 | | |
| |||
1465 | 1464 | | |
1466 | 1465 | | |
1467 | 1466 | | |
1468 | | - | |
1469 | 1467 | | |
1470 | 1468 | | |
1471 | 1469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
422 | 422 | | |
423 | | - | |
424 | | - | |
425 | | - | |
| 423 | + | |
426 | 424 | | |
427 | 425 | | |
428 | 426 | | |
429 | 427 | | |
430 | 428 | | |
431 | 429 | | |
432 | 430 | | |
433 | | - | |
434 | | - | |
| 431 | + | |
435 | 432 | | |
436 | 433 | | |
437 | 434 | | |
| |||
0 commit comments