Commit 5f94b0c
authored
AMDGPU: Try to reuse dest reg for s_add_i32 frame indexes (llvm#111201)
Hack around the register scavenger doing the wrong thing.
It does not find the result register as available in the
case the frame index add isn't also reading the dest register.
This is the quick fix for a regression where the scavenge would
create a broken spill of SGPR to memory. I believe this is still
broken for cases we cannot use the result register.
I'm confused about what position the scavenger iterator
is supposed to be in, and what RestoreAfter is for. The scavenger
is missing a full set of forward/backward APIs and there seems
to be an off by one somewhere.1 parent 5fdda41 commit 5f94b0c
File tree
3 files changed
+123
-69
lines changed- llvm
- lib/Target/AMDGPU
- test/CodeGen/AMDGPU
3 files changed
+123
-69
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2678 | 2678 | | |
2679 | 2679 | | |
2680 | 2680 | | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
2681 | 2686 | | |
2682 | 2687 | | |
2683 | 2688 | | |
2684 | 2689 | | |
2685 | | - | |
2686 | | - | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
2687 | 2693 | | |
2688 | 2694 | | |
2689 | 2695 | | |
| |||
2711 | 2717 | | |
2712 | 2718 | | |
2713 | 2719 | | |
2714 | | - | |
| 2720 | + | |
| 2721 | + | |
2715 | 2722 | | |
2716 | 2723 | | |
2717 | 2724 | | |
| |||
0 commit comments