diff options
Diffstat (limited to 'src/compiler/nir/nir_opt_dead_cf.c')
-rw-r--r-- | src/compiler/nir/nir_opt_dead_cf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/nir/nir_opt_dead_cf.c b/src/compiler/nir/nir_opt_dead_cf.c index 1490e6832a..53c92ecc28 100644 --- a/src/compiler/nir/nir_opt_dead_cf.c +++ b/src/compiler/nir/nir_opt_dead_cf.c @@ -87,9 +87,8 @@ opt_constant_if(nir_if *if_stmt, bool condition) * point to the correct source. */ nir_block *after = nir_cf_node_as_block(nir_cf_node_next(&if_stmt->cf_node)); - nir_block *last_block = - nir_cf_node_as_block(condition ? nir_if_last_then_node(if_stmt) - : nir_if_last_else_node(if_stmt)); + nir_block *last_block = condition ? nir_if_last_then_block(if_stmt) + : nir_if_last_else_block(if_stmt); nir_foreach_instr_safe(instr, after) { if (instr->type != nir_instr_type_phi) |