mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
nir/opt_loop: stop recursion at loop header phi in can_constant_fold()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40349>
This commit is contained in:
parent
1f9a0490c6
commit
738cc6a7db
1 changed files with 1 additions and 1 deletions
|
|
@ -321,7 +321,7 @@ can_constant_fold(nir_scalar scalar, nir_block *loop_header)
|
|||
nir_block *preheader = nir_block_cf_tree_prev(loop_header);
|
||||
nir_phi_instr *phi = nir_def_as_phi(scalar.def);
|
||||
nir_phi_src *src = nir_phi_get_src_from_block(phi, preheader);
|
||||
return can_constant_fold(nir_get_scalar(src->src.ssa, 0), loop_header);
|
||||
return nir_src_is_const(src->src);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue