Commit ef47349
committed
[AArch64,TTI] Remove RealUse check for vector insert/extract costs.
getVectorInstrCostHelper would return costs of zero for vector
inserts/extracts that move data between GPR and vector registers, if
there was no 'real' use, i.e. there was no corresponding existing
instruction.
This meant that passes like LoopVectorize and SLPVectorizer, which likely
are the main users of the interface, would understimate the cost of
insert/extracts that move data between GPR and vector registers, which
has non-trivial costs.
The patch removes the special case and only returns costs of zero for
lane 0 if it there is no need to transfer between integer and vector
registers.
This impacts a number of SLP test, and most of them look like
improvements to me.
I am seeing +2% end-to-end improvements on SLP-heavy workloads.1 parent 87e39c3 commit ef47349
File tree
29 files changed
+856
-345
lines changed- llvm
- lib/Target/AArch64
- test
- Analysis/CostModel/AArch64
- Transforms
- LowerMatrixIntrinsics
- SLPVectorizer
- AArch64
- X86
- VectorCombine/AArch64
29 files changed
+856
-345
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3724 | 3724 | | |
3725 | 3725 | | |
3726 | 3726 | | |
3727 | | - | |
| 3727 | + | |
3728 | 3728 | | |
3729 | 3729 | | |
3730 | 3730 | | |
| |||
3744 | 3744 | | |
3745 | 3745 | | |
3746 | 3746 | | |
3747 | | - | |
| 3747 | + | |
3748 | 3748 | | |
3749 | 3749 | | |
3750 | | - | |
3751 | | - | |
3752 | | - | |
| 3750 | + | |
3753 | 3751 | | |
3754 | 3752 | | |
3755 | 3753 | | |
| |||
3899 | 3897 | | |
3900 | 3898 | | |
3901 | 3899 | | |
3902 | | - | |
3903 | | - | |
3904 | | - | |
| 3900 | + | |
3905 | 3901 | | |
3906 | 3902 | | |
3907 | 3903 | | |
3908 | 3904 | | |
3909 | 3905 | | |
3910 | 3906 | | |
3911 | | - | |
3912 | | - | |
| 3907 | + | |
| 3908 | + | |
3913 | 3909 | | |
3914 | 3910 | | |
3915 | 3911 | | |
3916 | 3912 | | |
3917 | 3913 | | |
3918 | 3914 | | |
3919 | | - | |
3920 | | - | |
| 3915 | + | |
3921 | 3916 | | |
3922 | 3917 | | |
3923 | 3918 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 68 | + | |
| 69 | + | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
77 | | - | |
| 75 | + | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments