Affects blocks whose some (but not all) predecessors overwrite a register.
This commit fixes glitches in some games which regressed because of the
improved SCC no-compare optimization.
Fossil DB stats on Navi 21:
Totals from 2816 (2.09% of 134906) affected shaders:
CodeSize:
24224276 ->
24241580 (+0.07%)
Instrs: 4570595 -> 4574921 (+0.09%)
Latency:
53680256 ->
53693655 (+0.02%); split: -0.00%, +0.02%
InvThroughput: 9829289 -> 9830573 (+0.01%)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7257
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7305
Fixes:
2e56e2342094e8ec90afa5265b1c43503f662939
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18488>
if (all_same)
instr_idx_by_regs[block->index][i] = instr_idx_by_regs[first_pred][i];
else
- instr_idx_by_regs[block->index][i] = not_written_in_block;
+ instr_idx_by_regs[block->index][i] = written_by_multiple_instrs;
}
}
}