diff options
author | Timur Kristóf <timur.kristof@gmail.com> | 2019-11-21 12:31:14 +0100 |
---|---|---|
committer | Daniel Schürmann <daniel@schuermann.dev> | 2019-12-04 10:36:01 +0000 |
commit | 753670e9028cdb067405f7f27e29012db719732f (patch) | |
tree | 55f332e43e1c403cc0891918ef7bd14de42e0c5f | |
parent | 0d2d6720200aaa11709c1746642b7f7a76678390 (diff) | |
download | mesa-753670e9028cdb067405f7f27e29012db719732f.tar.gz |
aco: Remove lower_linear_bool_phi, it is not needed anymore.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
-rw-r--r-- | src/amd/compiler/aco_lower_bool_phis.cpp | 25 |
1 files changed, 1 insertions, 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<Instructio return; } -void lower_linear_bool_phi(Program *program, Block *block, aco_ptr<Instruction>& 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; } } |