Commit 2f005df
authored
[DAG][X86] Fold mgather/mscatter/etc with splat index (#65980)
A splat index means the operation is reading from (writing to) the same
memory location. Generally, zero is the cheapest value to splat. As
such, we'd prefer to add the splatted value to the base, and use a
constant zero as the index operand.1 parent 8b47913 commit 2f005df
File tree
2 files changed
+26
-15
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen/X86
2 files changed
+26
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11637 | 11637 | | |
11638 | 11638 | | |
11639 | 11639 | | |
11640 | | - | |
11641 | | - | |
11642 | 11640 | | |
11643 | 11641 | | |
11644 | 11642 | | |
| |||
11648 | 11646 | | |
11649 | 11647 | | |
11650 | 11648 | | |
| 11649 | + | |
| 11650 | + | |
| 11651 | + | |
| 11652 | + | |
| 11653 | + | |
| 11654 | + | |
| 11655 | + | |
| 11656 | + | |
| 11657 | + | |
| 11658 | + | |
| 11659 | + | |
| 11660 | + | |
| 11661 | + | |
| 11662 | + | |
| 11663 | + | |
11651 | 11664 | | |
11652 | 11665 | | |
11653 | 11666 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1747 | 1747 | | |
1748 | 1748 | | |
1749 | 1749 | | |
1750 | | - | |
| 1750 | + | |
1751 | 1751 | | |
1752 | | - | |
1753 | 1752 | | |
1754 | | - | |
1755 | | - | |
1756 | | - | |
1757 | | - | |
1758 | | - | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
1759 | 1758 | | |
1760 | 1759 | | |
1761 | 1760 | | |
1762 | 1761 | | |
1763 | 1762 | | |
1764 | 1763 | | |
1765 | | - | |
1766 | 1764 | | |
| 1765 | + | |
| 1766 | + | |
1767 | 1767 | | |
1768 | | - | |
1769 | | - | |
1770 | | - | |
1771 | | - | |
1772 | | - | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
1773 | 1771 | | |
1774 | 1772 | | |
1775 | 1773 | | |
| |||
0 commit comments