summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2019-02-25 11:14:11 +0200
committerTapani Pälli <[email protected]>2019-02-26 08:56:25 +0200
commit22267feff1a35c4b6f1f0cb9c8e371727f99b5d6 (patch)
treeeb4e9d0b5fd35586383568c6fd290596655607ac /src/compiler/nir
parent97566efe5cac0ff11b23d8f27001fc98c7cea2af (diff)
nir: initialize value in copy_prop_vars_block
Fixes following valgrind warning: ==27561== Conditional jump or move depends on uninitialised value(s) ==27561== at 0x667856B: value_set_ssa_components (nir_opt_copy_prop_vars.c:78) ==27561== by 0x667A1C4: copy_prop_vars_block (nir_opt_copy_prop_vars.c:797) Fixes: 62332d139c8 "nir: Add a local variable-based copy propagation pass" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir_opt_copy_prop_vars.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c b/src/compiler/nir/nir_opt_copy_prop_vars.c
index 61f3dd8a9df..4a900096b6c 100644
--- a/src/compiler/nir/nir_opt_copy_prop_vars.c
+++ b/src/compiler/nir/nir_opt_copy_prop_vars.c
@@ -763,7 +763,7 @@ copy_prop_vars_block(struct copy_prop_var_state *state,
struct copy_entry *src_entry =
lookup_entry_for_deref(copies, src, nir_derefs_a_contains_b_bit);
- struct value value;
+ struct value value = {0};
if (try_load_from_entry(state, src_entry, b, intrin, src, &value)) {
if (value.is_ssa) {
/* lookup_load has already ensured that we get a single SSA