From 753670e9028cdb067405f7f27e29012db719732f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Thu, 21 Nov 2019 12:31:14 +0100 Subject: [PATCH] aco: Remove lower_linear_bool_phi, it is not needed anymore. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Timur Kristóf Reviewed-by: Rhys Perry Reviewed-by: Daniel Schürmann --- src/amd/compiler/aco_lower_bool_phis.cpp | 25 +----------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/amd/compiler/aco_lower_bool_phis.cpp b/src/amd/compiler/aco_lower_bool_phis.cpp index 9e5374fe6a0..dc64f0133b5 100644 --- a/src/amd/compiler/aco_lower_bool_phis.cpp +++ b/src/amd/compiler/aco_lower_bool_phis.cpp @@ -187,25 +187,6 @@ void lower_divergent_bool_phi(Program *program, Block *block, aco_ptr& phi) -{ - Builder bld(program); - - for (unsigned i = 0; i < phi->operands.size(); i++) { - if (!phi->operands[i].isTemp()) - continue; - - Temp phi_src = phi->operands[i].getTemp(); - if (phi_src.regClass() == s2) { - Temp new_phi_src = bld.tmp(s1); - insert_before_logical_end(&program->blocks[block->linear_preds[i]], - bld.sopc(aco_opcode::s_cmp_lg_u64, bld.scc(Definition(new_phi_src)), - Operand(0u), phi_src).get_ptr()); - phi->operands[i].setTemp(new_phi_src); - } - } -} - void lower_bool_phis(Program* program) { for (Block& block : program->blocks) { @@ -214,11 +195,7 @@ void lower_bool_phis(Program* program) assert(phi->definitions[0].regClass() != s1); if (phi->definitions[0].regClass() == s2) lower_divergent_bool_phi(program, &block, phi); - } else if (phi->opcode == aco_opcode::p_linear_phi) { - /* if it's a valid non-boolean phi, this should be a no-op */ - if (phi->definitions[0].regClass() == s1) - lower_linear_bool_phi(program, &block, phi); - } else { + } else if (!is_phi(phi)) { break; } } -- 2.30.2