Module: Mesa Branch: master Commit: 437995bb7055d2e75c93e58a4f20af1040d74f8f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=437995bb7055d2e75c93e58a4f20af1040d74f8f
Author: Rhys Perry <[email protected]> Date: Fri Oct 16 15:50:39 2020 +0100 aco: remove all-undef phi opt This doesn't look like it would create correct IR for 8/16-bit phis and doesn't seem to help anything. If we ever want to do this, it's probably better done in nir_opt_remove_phis(). No fossil-db changes. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216> --- src/amd/compiler/aco_instruction_selection.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 6b82f8289e9..3111d7f8b76 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -9233,20 +9233,6 @@ void visit_phi(isel_context *ctx, nir_phi_instr *instr) operands[num_operands++] = Operand(RegClass()); } - if (num_defined == 0) { - Builder bld(ctx->program, ctx->block); - if (dst.bytes() == 4) { - bld.copy(Definition(dst), Operand(0u)); - } else { - aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(aco_opcode::p_create_vector, Format::PSEUDO, dst.size(), 1)}; - for (unsigned i = 0; i < dst.size(); i++) - vec->operands[i] = Operand(0u); - vec->definitions[0] = Definition(dst); - ctx->block->instructions.emplace_back(std::move(vec)); - } - return; - } - /* we can use a linear phi in some cases if one src is undef */ if (dst.is_linear() && ctx->block->kind & block_kind_merge && num_defined == 1) { phi.reset(create_instruction<Pseudo_instruction>(aco_opcode::p_linear_phi, Format::PSEUDO, num_operands, 1)); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
