diff --git a/src/amd/compiler/aco_live_var_analysis.cpp b/src/amd/compiler/aco_live_var_analysis.cpp index 85eb3173020..b58b2a8ce2e 100644 --- a/src/amd/compiler/aco_live_var_analysis.cpp +++ b/src/amd/compiler/aco_live_var_analysis.cpp @@ -67,6 +67,8 @@ RegisterDemand get_temp_reg_changes(Instruction* instr) for (Operand op : instr->operands) { if (op.isFirstKillBeforeDef() || op.isCopyKill()) available_def_space -= op.getTemp(); + else if (op.isClobbered() && !op.isKill()) + available_def_space -= op.getTemp(); } return available_def_space;