From bd699b5d88500b7ff7b4f1a82b17549d11db8fae Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Fri, 17 May 2024 17:50:15 +0200 Subject: [PATCH] aco/optimizer: remove ineffective vcc opt No stats changes. Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_optimizer.cpp | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index bb02c8c83da..0fb9f8ad69a 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -82,7 +82,6 @@ enum Label { label_omod5 = 1 << 10, label_clamp = 1 << 12, label_undefined = 1 << 14, - label_vcc = 1 << 15, label_b2f = 1 << 16, label_add_sub = 1 << 17, label_bitwise = 1 << 18, @@ -117,7 +116,7 @@ static constexpr uint64_t instr_mod_labels = label_omod2 | label_omod4 | label_omod5 | label_clamp | label_insert | label_f2f16; static constexpr uint64_t instr_labels = instr_usedef_labels | instr_mod_labels | label_split; -static constexpr uint64_t temp_labels = label_abs | label_neg | label_temp | label_vcc | label_b2f | +static constexpr uint64_t temp_labels = label_abs | label_neg | label_temp | label_b2f | label_uniform_bool | label_scc_invert | label_b2i | label_fcanonicalize; static constexpr uint32_t val_labels = @@ -332,14 +331,6 @@ struct ssa_info { bool is_undefined() { return label & label_undefined; } - void set_vcc(Temp vcc_val) - { - add_label(label_vcc); - temp = vcc_val; - } - - bool is_vcc() { return label & label_vcc; } - void set_b2f(Temp b2f_val) { add_label(label_b2f); @@ -1947,22 +1938,12 @@ label_instruction(opt_ctx& ctx, aco_ptr& instr) break; } case aco_opcode::v_cndmask_b32: - if (instr->operands[0].constantEquals(0) && instr->operands[1].constantEquals(0xFFFFFFFF)) - ctx.info[instr->definitions[0].tempId()].set_vcc(instr->operands[2].getTemp()); - else if (instr->operands[0].constantEquals(0) && - instr->operands[1].constantEquals(0x3f800000u)) + if (instr->operands[0].constantEquals(0) && instr->operands[1].constantEquals(0x3f800000u)) ctx.info[instr->definitions[0].tempId()].set_b2f(instr->operands[2].getTemp()); else if (instr->operands[0].constantEquals(0) && instr->operands[1].constantEquals(1)) ctx.info[instr->definitions[0].tempId()].set_b2i(instr->operands[2].getTemp()); break; - case aco_opcode::v_cmp_lg_u32: - if (instr->format == Format::VOPC && /* don't optimize VOP3 / SDWA / DPP */ - instr->operands[0].constantEquals(0) && instr->operands[1].isTemp() && - ctx.info[instr->operands[1].tempId()].is_vcc()) - ctx.info[instr->definitions[0].tempId()].set_temp( - ctx.info[instr->operands[1].tempId()].temp); - break; case aco_opcode::v_add_u32: case aco_opcode::v_add_co_u32: case aco_opcode::v_add_co_u32_e64: