From: Daniel Schürmann Date: Mon, 20 Apr 2020 12:02:26 +0000 (+0100) Subject: aco: move src1 to vgpr instead of using VOP3 for VOP2 instructions during isel X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c3c1f4d6bcc210408f8b180727d269838b38193b;p=mesa.git aco: move src1 to vgpr instead of using VOP3 for VOP2 instructions during isel Is simpler and helps a couple of shaders. Totals from affected shaders: (Vega) Code Size: 16341296 -> 16335460 (-0.04 %) bytes Reviewed-by: Rhys Perry Part-of: --- diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 1043bb2d2c0..7a42bee0f70 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -561,16 +561,8 @@ void emit_vop2_instruction(isel_context *ctx, nir_alu_instr *instr, aco_opcode o Temp t = src0; src0 = src1; src1 = t; - } else if (src0.type() == RegType::vgpr && - op != aco_opcode::v_madmk_f32 && - op != aco_opcode::v_madak_f32 && - op != aco_opcode::v_madmk_f16 && - op != aco_opcode::v_madak_f16) { - /* If the instruction is not commutative, we emit a VOP3A instruction */ - bld.vop2_e64(op, Definition(dst), src0, src1); - return; } else { - src1 = bld.copy(bld.def(RegType::vgpr, src1.size()), src1); //TODO: as_vgpr + src1 = as_vgpr(ctx, src1); } }