Commit 39c454a
authored
[TTI] getScalingFactorCost should return InstructionCost::getInvalid() instead of -1. (llvm#129802)
Historically this function return an int with negative values meaning
invalid. It was migrated to InstructionCost in 43ace8b, but the
code was not updated to return invalid cost instead of -1. In that
commit, the caller in LSR was updated to assert that the cost is valid
instead of positive. We should return invalid instead of a negative
value so LSR will assert if the cost isn't valid.1 parent b53e757 commit 39c454a
File tree
8 files changed
+8
-8
lines changed- llvm
- include/llvm
- Analysis
- CodeGen
- lib/Target
- AArch64
- ARM
- X86
8 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
| 367 | + | |
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
| 514 | + | |
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5271 | 5271 | | |
5272 | 5272 | | |
5273 | 5273 | | |
5274 | | - | |
| 5274 | + | |
5275 | 5275 | | |
5276 | 5276 | | |
5277 | 5277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2668 | 2668 | | |
2669 | 2669 | | |
2670 | 2670 | | |
2671 | | - | |
| 2671 | + | |
2672 | 2672 | | |
2673 | 2673 | | |
2674 | 2674 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7057 | 7057 | | |
7058 | 7058 | | |
7059 | 7059 | | |
7060 | | - | |
| 7060 | + | |
7061 | 7061 | | |
7062 | 7062 | | |
7063 | 7063 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| |||
0 commit comments