From 07b1fd64b7e7c878061937353bd4606912326076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 11 Sep 2024 10:28:51 +0200 Subject: [PATCH] aco/live_var_analysis: don't set lateKill for p_interp_gfx11 m0 operand There is no danger of overwriting m0 anymore. Fixes: dfc13fcf9f2df74bfc008f41579f07157fe26b0e ('aco: introduce Operand flag 'CopyKill'') Part-of: --- src/amd/compiler/aco_live_var_analysis.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/amd/compiler/aco_live_var_analysis.cpp b/src/amd/compiler/aco_live_var_analysis.cpp index 14c6e2f4745..de78c1a98da 100644 --- a/src/amd/compiler/aco_live_var_analysis.cpp +++ b/src/amd/compiler/aco_live_var_analysis.cpp @@ -214,10 +214,8 @@ process_live_temps_per_block(live_ctx& ctx, Block* block) insn->opcode == aco_opcode::v_mqsad_u32_u8) { for (Operand& op : insn->operands) op.setLateKill(true); - } else if (insn->opcode == aco_opcode::p_interp_gfx11) { - insn->operands.back().setLateKill(true); /* we don't want the bld.lm def to use m0 */ - if (insn->operands.size() == 7) - insn->operands[5].setLateKill(true); /* we re-use the destination reg in the middle */ + } else if (insn->opcode == aco_opcode::p_interp_gfx11 && insn->operands.size() == 7) { + insn->operands[5].setLateKill(true); /* we re-use the destination reg in the middle */ } else if (insn->opcode == aco_opcode::v_interp_p1_f32 && ctx.program->dev.has_16bank_lds) { insn->operands[0].setLateKill(true); } else if (insn->opcode == aco_opcode::p_init_scratch) {