mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
nir/opt_if: allow undef instructions on ELSE side for if-simplification
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:
parent
1394f79517
commit
daa3d5292f
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue