Commit f400daa
committed
[InstCombine] limit zext-of-icmp folds to bit-hacks
In the changed tests, we avoid creating extra instructions,
and there are no obvious regressions in IR tests at least.
Codegen should be able to create the shift+mask form if that
is profitable.
This is a more general fix for issue #59897 than 0eedc9e .1 parent a4f3b23 commit f400daa
File tree
2 files changed
+9
-11
lines changed- llvm
- lib/Transforms/InstCombine
- test/Transforms/InstCombine
2 files changed
+9
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1024 | 1024 | | |
1025 | 1025 | | |
1026 | 1026 | | |
1027 | | - | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
1028 | 1030 | | |
1029 | 1031 | | |
1030 | 1032 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
652 | 651 | | |
653 | 652 | | |
654 | 653 | | |
| |||
661 | 660 | | |
662 | 661 | | |
663 | 662 | | |
664 | | - | |
665 | | - | |
666 | | - | |
| 663 | + | |
| 664 | + | |
667 | 665 | | |
668 | 666 | | |
669 | 667 | | |
| |||
678 | 676 | | |
679 | 677 | | |
680 | 678 | | |
681 | | - | |
682 | | - | |
683 | | - | |
| 679 | + | |
684 | 680 | | |
685 | 681 | | |
686 | 682 | | |
| |||
0 commit comments