diff options
author | Timothy Arceri <[email protected]> | 2020-04-07 23:33:55 +1000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-08 01:35:45 +0000 |
commit | 52c8bc0130a2031904f8f4e2187baf2f3f8ff6ec (patch) | |
tree | 55a6671cddde55c110916cc7fa441005a3ada27a /src/compiler/nir | |
parent | 1f649ff10764b2f47fd69013f390e9286547cc3b (diff) |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4477>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_opt_if.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |