summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_opt_peephole_select.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-04-26 20:16:21 -0700
committerJason Ekstrand <[email protected]>2016-04-28 15:54:48 -0700
commit8564916d01b31ca5665a27366e483738541ba5a3 (patch)
tree5b0563e838824f90ed398c0bf64ab3e3339fe7ce /src/compiler/nir/nir_opt_peephole_select.c
parent707e72f13bb78869ee95d3286980bf1709cba6cf (diff)
nir: Switch the arguments to nir_foreach_phi_src
This matches the "foreach x in container" pattern found in many other programming languages. Generated by the following regular expression: s/nir_foreach_phi_src(\([^,]*\),\s*\([^,]*\))/nir_foreach_phi_src(\2, \1)/ and a similar expression for nir_foreach_phi_src_safe. Reviewed-by: Eduardo Lima Mitev <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_peephole_select.c')
-rw-r--r--src/compiler/nir/nir_opt_peephole_select.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opt_peephole_select.c b/src/compiler/nir/nir_opt_peephole_select.c
index b31cc35ba71..4d2b74dc7ff 100644
--- a/src/compiler/nir/nir_opt_peephole_select.c
+++ b/src/compiler/nir/nir_opt_peephole_select.c
@@ -194,7 +194,7 @@ nir_opt_peephole_select_block(nir_block *block, void *mem_ctx)
memset(sel->src[0].swizzle, 0, sizeof sel->src[0].swizzle);
assert(exec_list_length(&phi->srcs) == 2);
- nir_foreach_phi_src(phi, src) {
+ nir_foreach_phi_src(src, phi) {
assert(src->pred == then_block || src->pred == else_block);
assert(src->src.is_ssa);