nir_lower_returns: Mark assert-only var as ASSERTED

Fixes: 5d238c0c ("nir_lower_returns: Optimize phis before beginning the pass")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23634>
This commit is contained in:
Jesse Natalie 2023-06-13 10:04:04 -07:00 committed by Marge Bot
parent 13df91d7d7
commit 83f741124b

View file

@ -136,7 +136,7 @@ lower_returns_in_if(nir_if *if_stmt, struct lower_returns_state *state)
* predecessor, and should've been removed by the opt_remove_phis before
* beginning this pass.
*/
nir_block *succ_block = nir_after_cf_node(&if_stmt->cf_node).block;
ASSERTED nir_block *succ_block = nir_after_cf_node(&if_stmt->cf_node).block;
assert(nir_block_first_instr(succ_block) == NULL ||
nir_block_first_instr(succ_block)->type != nir_instr_type_phi);