From 20eb1acb6f404ffa4e502e7de8dec8ac83e7a8a8 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 3 Feb 2020 17:54:07 +0000 Subject: [PATCH] aco: fix gfx10_wave64_bpermute MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since 9254fb4fc72, the pass replaced the SCC clobber with the scalar identity temporary. Just skip most of the temporary setup, since we don't need it for gfx10_wave64_bpermute. Although shuffles are disabled on GFX10, Detroit: Become Human seems to use them anyway. Signed-off-by: Rhys Perry Reviewed-By: Timur Kristóf Fixes: 9254fb4fc72ed289ffded28ef067b4582973e90c ('aco: don't use a scalar temporary for reductions on GFX10') Part-of: --- src/amd/compiler/aco_reduce_assign.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_reduce_assign.cpp b/src/amd/compiler/aco_reduce_assign.cpp index 58c64cf..96846e9 100644 --- a/src/amd/compiler/aco_reduce_assign.cpp +++ b/src/amd/compiler/aco_reduce_assign.cpp @@ -114,6 +114,11 @@ void setup_reduce_temp(Program* program) } } + if (op == gfx10_wave64_bpermute) { + instr->operands[1] = Operand(reduceTmp); + continue; + } + /* same as before, except for the vector temporary instead of the reduce temporary */ unsigned cluster_size = static_cast(instr)->cluster_size; bool need_vtmp = op == imul32 || op == fadd64 || op == fmul64 || @@ -121,7 +126,7 @@ void setup_reduce_temp(Program* program) op == umax64 || op == imin64 || op == imax64 || op == imul64; - if (program->chip_class >= GFX10 && cluster_size == 64 && op != gfx10_wave64_bpermute) + if (program->chip_class >= GFX10 && cluster_size == 64) need_vtmp = true; if (program->chip_class >= GFX10 && op == iadd64) need_vtmp = true; -- 2.7.4