Module: Mesa Branch: master Commit: 9a4d76e534920a54c28092311ab6da90c6d7b8d3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a4d76e534920a54c28092311ab6da90c6d7b8d3
Author: Jason Ekstrand <[email protected]> Date: Wed Aug 31 16:35:21 2016 -0700 nir/dead_cf: Don't crash on unreachable after-loop blocks Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Connor Abbott <[email protected]> --- src/compiler/nir/nir_opt_dead_cf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_opt_dead_cf.c b/src/compiler/nir/nir_opt_dead_cf.c index 3551124..1490e68 100644 --- a/src/compiler/nir/nir_opt_dead_cf.c +++ b/src/compiler/nir/nir_opt_dead_cf.c @@ -205,7 +205,8 @@ loop_is_dead(nir_loop *loop) nir_metadata_require(impl, nir_metadata_live_ssa_defs | nir_metadata_dominance); - for (nir_block *cur = after->imm_dom; cur != before; cur = cur->imm_dom) { + for (nir_block *cur = after->imm_dom; cur && cur != before; + cur = cur->imm_dom) { nir_foreach_instr(instr, cur) { if (!nir_foreach_ssa_def(instr, def_not_live_out, after)) return false; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
