Mesa (master): aco: fix off-by-one error when initializing sgpr_live_in
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jan 22 17:53:01 UTC 2020
Module: Mesa
Branch: master
Commit: 15a1cc00d38db084b41d7ae7907aa0b0c22f2099
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=15a1cc00d38db084b41d7ae7907aa0b0c22f2099
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Wed Jan 22 11:51:31 2020 +0000
aco: fix off-by-one error when initializing sgpr_live_in
Signed-off-by: Rhys Perry <pendingchaos02 at 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 at 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>
---
src/amd/compiler/aco_register_allocation.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp
index ec8838d97ed..8370effdbc3 100644
--- a/src/amd/compiler/aco_register_allocation.cpp
+++ b/src/amd/compiler/aco_register_allocation.cpp
@@ -1365,7 +1365,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];
More information about the mesa-commit
mailing list