From: Samuel Pitoiset Date: Mon, 18 May 2020 14:00:10 +0000 (+0200) Subject: aco: use a temporary SGPR for 8-bit/16-bit literal reduction identities X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c76595aec2c47463a3ae580c56bd19191f185acf;p=mesa.git 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 Reviewed-by: Rhys Perry Part-of: --- 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()));