pan/bi: Respect side effects in DCE
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848>
This commit is contained in:
parent
f5709f17a2
commit
b0a2a0af75
|
@ -48,7 +48,7 @@ bi_opt_dead_code_eliminate(bi_context *ctx, bi_block *block, bool soft)
|
|||
unsigned index = bi_get_node(ins->dest[0]);
|
||||
|
||||
if (index < temp_count && !live[index]) {
|
||||
if (soft)
|
||||
if (soft || bi_side_effects(ins->op))
|
||||
ins->dest[0] = bi_null();
|
||||
else
|
||||
bi_remove_instruction(ins);
|
||||
|
|
Loading…
Reference in New Issue