aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-07-25 10:33:33 -0700
committerJason Ekstrand <[email protected]>2018-07-29 13:39:35 -0700
commit9a4ab4c120b97397321b8a86abdbdbe96ee42141 (patch)
tree3e7f6c290dc3509f3c4ec26fae9688c893813e62
parent5c1c6939ce384dbcae690ed4d5fbfca3ae240844 (diff)
nir: Take if uses into account in ssa_def_components_read
Fixes: d800b7daa5440 "nir: Add a helper for figuring out what..." Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
-rw-r--r--src/compiler/nir/nir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c
index bc7f05b3e86..a849664134f 100644
--- a/src/compiler/nir/nir.c
+++ b/src/compiler/nir/nir.c
@@ -1446,6 +1446,9 @@ nir_ssa_def_components_read(const nir_ssa_def *def)
}
}
+ if (!list_empty(&def->if_uses))
+ read_mask |= 1;
+
return read_mask;
}