nir/peephole_select: don't special case nir_opt_collapse_if + limit = ~0

Not sure if this was intentionally left when block_check_for_allowed_instrs's
param was changed from bool to int, but it certainly was broken without the
previous commit for discards. Now those should work, so the (unintentional?)
special case can be removed.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
This commit is contained in:
Georg Lehmann 2025-02-17 22:59:48 +01:00 committed by Marge Bot
parent 40f96460ee
commit c31fadd25e

View file

@ -400,7 +400,7 @@ nir_opt_collapse_if(nir_if *if_stmt, nir_shader *shader, unsigned limit,
/* check if the block before the nested if matches the requirements */
nir_block *first = nir_if_first_then_block(parent_if);
unsigned count = 0;
if (!block_check_for_allowed_instrs(first, &count, limit != 0,
if (!block_check_for_allowed_instrs(first, &count, limit,
indirect_load_ok, expensive_alu_ok))
return false;