mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 11:30:11 +01:00
nir: Mark divergent regs in phis_to_regs_block()
This way we avoid destroying divergence information which may be used by passes which also need to lower phis. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
This commit is contained in:
parent
2be97717e6
commit
1bd9c1b958
1 changed files with 1 additions and 0 deletions
|
|
@ -1169,6 +1169,7 @@ nir_lower_phis_to_regs_block(nir_block *block)
|
||||||
bool progress = false;
|
bool progress = false;
|
||||||
nir_foreach_phi_safe(phi, block) {
|
nir_foreach_phi_safe(phi, block) {
|
||||||
nir_def *reg = decl_reg_for_ssa_def(&b, &phi->def);
|
nir_def *reg = decl_reg_for_ssa_def(&b, &phi->def);
|
||||||
|
set_reg_divergent(reg, phi->def.divergent);
|
||||||
|
|
||||||
b.cursor = nir_after_instr(&phi->instr);
|
b.cursor = nir_after_instr(&phi->instr);
|
||||||
nir_def_rewrite_uses(&phi->def, nir_load_reg(&b, reg));
|
nir_def_rewrite_uses(&phi->def, nir_load_reg(&b, reg));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue