nir: Take if uses into account in ssa_def_components_read

Fixes: d800b7daa5 "nir: Add a helper for figuring out what..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
Jason Ekstrand 2018-07-25 10:33:33 -07:00
parent 5c1c6939ce
commit 9a4ab4c120
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}