nir: skip opt_loop_peel_initial_break if continue block only has phis
Doing that optimization wouldn't do anything useful in this case. nir_block_has_non_copy() is used by opt_loop_peel_initial_break(). Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31002>
This commit is contained in:
@@ -3507,6 +3507,8 @@ nir_block_contains_work(nir_block *block)
|
||||
return true;
|
||||
|
||||
nir_foreach_instr(instr, block) {
|
||||
if (instr->type == nir_instr_type_phi)
|
||||
continue;
|
||||
if (instr->type != nir_instr_type_alu ||
|
||||
!nir_op_is_vec_or_mov(nir_instr_as_alu(instr)->op))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user