nir: Use nir_foreach_phi_src consistently.

I copy-and-pasted one of these and people noted that we had a better tool,
so make sure nobody else copy and pastes it.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17664>
This commit is contained in:
Emma Anholt
2022-08-01 09:24:44 -07:00
committed by Marge Bot
parent a4bfe11a49
commit 31b9b04880
2 changed files with 2 additions and 2 deletions

View File

@@ -857,7 +857,7 @@ rewrite_phi_predecessor_blocks(nir_if *nif,
nir_phi_instr *phi = nir_instr_as_phi(instr);
foreach_list_typed(nir_phi_src, src, node, &phi->srcs) {
nir_foreach_phi_src(src, phi) {
if (src->pred == old_then_block) {
src->pred = new_then_block;
} else if (src->pred == old_else_block) {