From c7d679f0f7e356d3f3a496bc495991d15378ec4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 12 May 2021 12:52:52 +0200 Subject: [PATCH] aco: relax validation rules for p_reduce dst RegType MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By exposing a subgroupSize of 64, reductions with cluster_size 32 in wave32 might be considered divergent, and thus, result in a VGPR. Fixes: dEQP-VK.subgroups.clustered.graphics.subgroupclustered* with wave32 Reviewed-by: Timur Kristóf Part-of: --- src/amd/compiler/aco_validate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_validate.cpp b/src/amd/compiler/aco_validate.cpp index ee6e4c7a2e6..d2d748c62fa 100644 --- a/src/amd/compiler/aco_validate.cpp +++ b/src/amd/compiler/aco_validate.cpp @@ -378,7 +378,7 @@ bool validate_ir(Program* program) check(op.regClass().type() == RegType::vgpr, "All operands of PSEUDO_REDUCTION instructions must be in VGPRs.", instr.get()); if (instr->opcode == aco_opcode::p_reduce && instr->reduction().cluster_size == program->wave_size) - check(instr->definitions[0].regClass().type() == RegType::sgpr, "The result of unclustered reductions must go into an SGPR.", instr.get()); + check(instr->definitions[0].regClass().type() == RegType::sgpr || program->wave_size == 32, "The result of unclustered reductions must go into an SGPR.", instr.get()); else check(instr->definitions[0].regClass().type() == RegType::vgpr, "The result of scans and clustered reductions must go into a VGPR.", instr.get());