Mesa (master): aco: use a temporary SGPR for 8-bit/16-bit literal reduction identities
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 21 15:15:03 UTC 2020
Module: Mesa
Branch: master
Commit: c76595aec2c47463a3ae580c56bd19191f185acf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c76595aec2c47463a3ae580c56bd19191f185acf
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Mon May 18 16:00:10 2020 +0200
aco: use a temporary SGPR for 8-bit/16-bit literal reduction identities
Otherwise, the compiler overwrites s0 which contains the exec mask.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4494>
---
src/amd/compiler/aco_reduce_assign.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/amd/compiler/aco_reduce_assign.cpp b/src/amd/compiler/aco_reduce_assign.cpp
index 96846e926d4..3dd396e2569 100644
--- a/src/amd/compiler/aco_reduce_assign.cpp
+++ b/src/amd/compiler/aco_reduce_assign.cpp
@@ -163,9 +163,11 @@ void setup_reduce_temp(Program* program)
bool need_sitmp = (program->chip_class <= GFX7 || program->chip_class >= GFX10) && instr->opcode != aco_opcode::p_reduce;
if (instr->opcode == aco_opcode::p_exclusive_scan) {
need_sitmp |=
- (op == imin32 || op == imin64 || op == imax32 || op == imax64 ||
- op == fmin32 || op == fmin64 || op == fmax32 || op == fmax64 ||
- op == fmul64);
+ (op == imin8 || op == imin16 || op == imin32 || op == imin64 ||
+ op == imax8 || op == imax16 || op == imax32 || op == imax64 ||
+ op == fmin16 || op == fmin32 || op == fmin64 ||
+ op == fmax16 || op == fmax32 || op == fmax64 ||
+ op == fmul16 || op == fmul64);
}
if (need_sitmp) {
instr->definitions[2] = bld.def(RegClass(RegType::sgpr, instr->operands[0].size()));
More information about the mesa-commit
mailing list