nir/opt_if: allow undef instructions on ELSE side for if-simplification
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Totals from 72 (0.04% of 202440) affected shaders: (Navi48)

Instrs: 213900 -> 213873 (-0.01%); split: -0.03%, +0.02%
CodeSize: 1215012 -> 1214924 (-0.01%); split: -0.01%, +0.01%
Latency: 4458993 -> 4458679 (-0.01%)
Copies: 18840 -> 18816 (-0.13%)
Branches: 5044 -> 5043 (-0.02%)
VALU: 116547 -> 116529 (-0.02%)
SALU: 28686 -> 28669 (-0.06%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40738>
This commit is contained in:
Daniel Schürmann 2026-04-02 08:46:26 +02:00 committed by Marge Bot
parent 1394f79517
commit daa3d5292f

View file

@ -702,7 +702,8 @@ is_block_empty_or_constant(nir_block *block)
return false;
nir_foreach_instr(instr, block) {
if (instr->type != nir_instr_type_load_const)
if (instr->type != nir_instr_type_load_const &&
instr->type != nir_instr_type_undef)
return false;
}