diff options
author | Rhys Perry <pendingchaos02@gmail.com> | 2020-01-22 11:51:31 +0000 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-01-28 08:54:25 -0800 |
commit | 08f16295340df191b9cc868baced2396bab13704 (patch) | |
tree | 9d1e0465c3f14b5e22f375e7206bf061968b90e0 | |
parent | b967399ceab25911e9737262b0836c6908bcf1f0 (diff) |
aco: fix off-by-one error when initializing sgpr_live_in
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2394
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3511>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3511>
(cherry picked from commit 15a1cc00d38db084b41d7ae7907aa0b0c22f2099)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/amd/compiler/aco_register_allocation.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json index 996507ae72b..81371f4ab29 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1273,7 +1273,7 @@ "description": "aco: fix off-by-one error when initializing sgpr_live_in", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "93c8ebfa780ebd1495095e794731881aef29e7d3" }, diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index c4144cc42f0..ac6f9fc57c9 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1347,7 +1347,7 @@ void register_allocation(Program *program, std::vector<std::set<Temp>> live_out_ } /* fill in sgpr_live_in */ - for (unsigned i = 0; i < ctx.max_used_sgpr; i++) + for (unsigned i = 0; i <= ctx.max_used_sgpr; i++) sgpr_live_in[block.index][i] = register_file[i]; sgpr_live_in[block.index][127] = register_file[scc.reg]; |