From 52c8bc0130a2031904f8f4e2187baf2f3f8ff6ec Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 7 Apr 2020 23:33:55 +1000 Subject: 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: --- src/compiler/nir/nir_opt_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/nir') 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 -- cgit v1.2.3