Commit 47d3d13
committed
[Analysis] Add cost model for experimental.cttz.elts intrinsic
In PR llvm#88385 I've added support for auto-vectorisation of some
early exit loops, which requires using the experimental.cttz.elts
to calculate final indices in the early exit block. We need a
more accurate cost model for this intrinsic to better reflect the
cost of work required in the early exit block. I've tried to
accurately represent the expansion code for the intrinsic when
the target does not have efficient lowering for it. It's quite
tricky to model because you need to first figure out what types
will actually be used in the expansion. The type used can have
a significant effect on the cost if you end up using illegal
vector types.
Tests added here:
Analysis/CostModel/AArch64/cttz_elts.ll
Analysis/CostModel/RISCV/cttz_elts.ll1 parent 2e3e086 commit 47d3d13
File tree
6 files changed
+401
-12
lines changed- llvm
- include/llvm/CodeGen
- lib/CodeGen
- SelectionDAG
- test/Analysis/CostModel
- AArch64
- RISCV
6 files changed
+401
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
1758 | 1759 | | |
1759 | 1760 | | |
1760 | 1761 | | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
1761 | 1809 | | |
1762 | 1810 | | |
1763 | 1811 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
473 | 479 | | |
474 | 480 | | |
475 | 481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7861 | 7861 | | |
7862 | 7862 | | |
7863 | 7863 | | |
7864 | | - | |
7865 | | - | |
7866 | | - | |
7867 | | - | |
7868 | | - | |
7869 | | - | |
7870 | 7864 | | |
7871 | 7865 | | |
7872 | | - | |
7873 | | - | |
7874 | | - | |
7875 | | - | |
7876 | | - | |
7877 | | - | |
| 7866 | + | |
| 7867 | + | |
| 7868 | + | |
| 7869 | + | |
| 7870 | + | |
| 7871 | + | |
| 7872 | + | |
7878 | 7873 | | |
7879 | 7874 | | |
7880 | 7875 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1048 | 1048 | | |
1049 | 1049 | | |
1050 | 1050 | | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1051 | 1069 | | |
1052 | 1070 | | |
1053 | 1071 | | |
| |||
0 commit comments