mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 15:40:11 +01:00
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 <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4477>
This commit is contained in:
parent
1f649ff107
commit
52c8bc0130
1 changed files with 1 additions and 1 deletions
|
|
@ -998,7 +998,7 @@ opt_if_loop_terminator(nir_if *nif)
|
||||||
if (is_block_empty(first_continue_from_blk))
|
if (is_block_empty(first_continue_from_blk))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!nir_is_trivial_loop_if(nif, break_blk))
|
if (nir_block_ends_in_jump(continue_from_blk))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Even though this if statement has a jump on one side, we may still have
|
/* Even though this if statement has a jump on one side, we may still have
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue