Commit d6e3ade
authored
[RISCV] Account for ADDI immediate range in select of two constants w/ zicond (#155471)
When choosing to materialize a select of two constants using zicond, we
have a choice of which direction to compute the delta. The prior cost
was looking only at the cost of the values without accounting for the
fact it's actually the delta which is the highest cost and that
sometimes the addend can fold into an addi.1 parent ab3c0ca commit d6e3ade
File tree
2 files changed
+18
-13
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV
2 files changed
+18
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9287 | 9287 | | |
9288 | 9288 | | |
9289 | 9289 | | |
9290 | | - | |
9291 | | - | |
9292 | | - | |
9293 | | - | |
9294 | | - | |
| 9290 | + | |
| 9291 | + | |
| 9292 | + | |
| 9293 | + | |
| 9294 | + | |
| 9295 | + | |
| 9296 | + | |
| 9297 | + | |
| 9298 | + | |
| 9299 | + | |
| 9300 | + | |
| 9301 | + | |
9295 | 9302 | | |
9296 | 9303 | | |
9297 | 9304 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | 509 | | |
513 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
514 | 513 | | |
515 | 514 | | |
516 | 515 | | |
| |||
536 | 535 | | |
537 | 536 | | |
538 | 537 | | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | 538 | | |
543 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
544 | 542 | | |
545 | 543 | | |
546 | 544 | | |
| |||
0 commit comments