From: Timothy Arceri Date: Tue, 7 Apr 2020 13:33:55 +0000 (+1000) Subject: nir: make opt_if_loop_terminator() less strict X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=52c8bc0130a2031904f8f4e2187baf2f3f8ff6ec;p=mesa.git nir: make opt_if_loop_terminator() less strict nir_cf_{extract,reinsert}() can't stitch a block together if the block we are extracting ends in a jump but other jumps nested in further ifs should be fine to move. Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c index 75e4244cb2f..9460cefb79b 100644 --- a/src/compiler/nir/nir_opt_if.c +++ b/src/compiler/nir/nir_opt_if.c @@ -998,7 +998,7 @@ opt_if_loop_terminator(nir_if *nif) if (is_block_empty(first_continue_from_blk)) return false; - if (!nir_is_trivial_loop_if(nif, break_blk)) + if (nir_block_ends_in_jump(continue_from_blk)) return false; /* Even though this if statement has a jump on one side, we may still have