Commit a6c9bf0
committed
[SLPVectorizer][X86] Free load cost for stores with constant pointers
When estimating the cost for stores of constant buildvectors, do not
take into account the cost of the additional load to materialize a
vector from a constant pool when dealing with a constant pointer.
In such cases, the load is avoided in the first place, as the only
operations required simply involve computing the address of the
constant (`rip+base_addr+offset`) and the store itself.
Fixes regression: #111126.1 parent 3a01b46 commit a6c9bf0
File tree
3 files changed
+26
-11
lines changed- llvm
- lib/Target/X86
- test/Transforms
- LoopUnroll
- SLPVectorizer/X86
3 files changed
+26
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5157 | 5157 | | |
5158 | 5158 | | |
5159 | 5159 | | |
5160 | | - | |
5161 | | - | |
| 5160 | + | |
| 5161 | + | |
| 5162 | + | |
5162 | 5163 | | |
5163 | 5164 | | |
5164 | 5165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 60 | + | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
| |||
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
86 | | - | |
87 | | - | |
| 83 | + | |
88 | 84 | | |
89 | 85 | | |
90 | 86 | | |
| |||
96 | 92 | | |
97 | 93 | | |
98 | 94 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 95 | + | |
102 | 96 | | |
103 | 97 | | |
104 | 98 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments