aco/gfx12: fix VALUReadSGPRHazard with carry-out

fossil-db (gfx1201):
Totals from 370 (0.46% of 79653) affected shaders:
Instrs: 3933639 -> 3935914 (+0.06%)
CodeSize: 20743448 -> 20752068 (+0.04%); split: -0.00%, +0.04%
Latency: 26261246 -> 26261921 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 5363675 -> 5363760 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 65f95ae74e ("aco/insert_NOPs: implement VALU -> VALU case for VALUReadSGPRHazard on GFX12")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35387>
This commit is contained in:
Rhys Perry
2025-06-06 17:45:48 +01:00
committed by Marge Bot
parent 19e494a461
commit a714a19e16
+2 -2
View File
@@ -1606,9 +1606,9 @@ handle_instruction_gfx11(State& state, NOP_ctx_gfx11& ctx, aco_ptr<Instruction>&
}
if (instr->isVALU() && !instr->definitions.empty()) {
PhysReg reg = instr->definitions[0].physReg();
PhysReg reg = instr->definitions.back().physReg();
if (reg < m0 && ctx.sgpr_read_by_valu[reg / 2]) {
for (unsigned i = 0; i < instr->definitions[0].size(); i++)
for (unsigned i = 0; i < instr->definitions.back().size(); i++)
ctx.sgpr_read_by_valu_then_wr_by_valu.set(reg + i);
}
} else if (instr->isSALU() && !instr->definitions.empty()) {