Commit f1e98a6
committed
[LV] Return Invalid from getLegacyCost when instruction cost forced.
LoopVectorizationCostModel::expectedCost will only override the cost
returned by getInstructionCost when valid. This patch ensures we do
the same in VPCostContext::getLegacyCost, avoiding the "VPlan cost
model and legacy cost model disagreed" assert in the included test.1 parent c34cba0 commit f1e98a6
File tree
2 files changed
+27
-2
lines changed- llvm
- lib/Transforms/Vectorize
- test/Transforms/LoopVectorize/AArch64
2 files changed
+27
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6760 | 6760 | | |
6761 | 6761 | | |
6762 | 6762 | | |
6763 | | - | |
| 6763 | + | |
| 6764 | + | |
6764 | 6765 | | |
6765 | | - | |
| 6766 | + | |
6766 | 6767 | | |
6767 | 6768 | | |
6768 | 6769 | | |
| |||
Lines changed: 24 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 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments