Commit ade2276
committed
[RegAllocFast] Ensure live-in vregs get reloaded after INLINEASM_BR spills
We have already ensured in 9cec2b2
that `INLINEASM_BR` output operands get spilled onto the stack, both
in the fallthrough path and in the indirect targets. Since reloads of
live-ins values into physical registers contextually happen after all
MIR instructions (and ops) have been visited, make sure such loads are
placed at the start of the block, but after prologues or `INLINEASM_BR`
spills, as otherwise this may cause stale values to be read from the
stack.
Fixes: #74483, #110251.1 parent 376aa74 commit ade2276
File tree
2 files changed
+23
-6
lines changed- llvm
- lib/CodeGen
- test/CodeGen/X86
2 files changed
+23
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
| 395 | + | |
394 | 396 | | |
395 | 397 | | |
396 | 398 | | |
| |||
491 | 493 | | |
492 | 494 | | |
493 | 495 | | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
494 | 511 | | |
495 | 512 | | |
496 | 513 | | |
| |||
648 | 665 | | |
649 | 666 | | |
650 | 667 | | |
651 | | - | |
652 | | - | |
| 668 | + | |
| 669 | + | |
653 | 670 | | |
654 | 671 | | |
655 | 672 | | |
| |||
736 | 753 | | |
737 | 754 | | |
738 | 755 | | |
| 756 | + | |
| 757 | + | |
739 | 758 | | |
740 | 759 | | |
741 | 760 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 57 | + | |
| 58 | + | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
| |||
0 commit comments