Commit e3ec5a7
authored
[VectorCombine] foldShuffleOfBinops - fold shuffle(binop(shuffle(x),shuffle(z)),binop(shuffle(y),shuffle(w)) -> binop(shuffle(x,z),shuffle(y,w)) (llvm#120984)
Some patterns (in particular horizontal style patterns) can end up with shuffles straddling both sides of a binop/cmp.
Where individually the folds aren't worth it, by merging the (oneuse) shuffles we can notably reduce the net instruction count and cost.
One of the final steps towards finally addressing llvm#340721 parent cdad183 commit e3ec5a7
File tree
4 files changed
+95
-146
lines changed- llvm
- lib/Transforms/Vectorize
- test/Transforms
- PhaseOrdering/X86
- VectorCombine/X86
4 files changed
+95
-146
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1743 | 1743 | | |
1744 | 1744 | | |
1745 | 1745 | | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
1746 | 1776 | | |
1747 | 1777 | | |
1748 | 1778 | | |
| |||
1763 | 1793 | | |
1764 | 1794 | | |
1765 | 1795 | | |
1766 | | - | |
1767 | | - | |
| 1796 | + | |
| 1797 | + | |
1768 | 1798 | | |
1769 | 1799 | | |
1770 | 1800 | | |
| |||
0 commit comments