From: Timur Kristóf Date: Thu, 21 Nov 2019 11:31:14 +0000 (+0100) Subject: aco: Remove lower_linear_bool_phi, it is not needed anymore. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=753670e9028cdb067405f7f27e29012db719732f;p=mesa.git aco: Remove lower_linear_bool_phi, it is not needed anymore. Signed-off-by: Timur Kristóf Reviewed-by: Rhys Perry Reviewed-by: Daniel Schürmann --- 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; } }