nir/instr_set: support instrs with no def

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32235>
This commit is contained in:
Georg Lehmann 2024-11-19 22:46:51 +01:00 committed by Marge Bot
parent 7097b705b5
commit a67ca0eb59

View file

@ -786,7 +786,9 @@ nir_instr_set_add_or_rewrite(struct set *instr_set, nir_instr *instr,
nir_instr_as_alu(match)->fp_fast_math |= nir_instr_as_alu(instr)->fp_fast_math;
}
nir_def_rewrite_uses(def, new_def);
assert(!def == !new_def);
if (def)
nir_def_rewrite_uses(def, new_def);
return match;
} else {