diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index 52e0155917d..c0526d4ff1b 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -2948,13 +2948,6 @@ apply_sgprs(opt_ctx& ctx, aco_ptr& instr) ssa_info& info = ctx.info[sgpr_info_id]; - /* Applying two sgprs require making it VOP3, so don't do it unless it's - * definitively beneficial. - * TODO: this is too conservative because later the use count could be reduced to 1 */ - if (!info.is_extract() && num_sgprs && ctx.uses[sgpr_info_id] > 1 && !instr->isVOP3() && - !instr->isSDWA() && instr->format != Format::VOP3P) - break; - Temp sgpr = info.is_extract() ? info.instr->operands[0].getTemp() : info.temp; bool new_sgpr = sgpr.id() != sgpr_ids[0] && sgpr.id() != sgpr_ids[1]; if (new_sgpr && num_sgprs >= max_sgprs)