From 8e4cba9d92fff72899390f62285c4f90c289bdc2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 12 Jan 2018 15:34:22 -0800 Subject: [PATCH] broadcom/vc5: Also check the update flags for avoiding DCE. I was trying to do a NULL-destination UF, and it got removed. --- src/broadcom/compiler/vir_opt_dead_code.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/broadcom/compiler/vir_opt_dead_code.c b/src/broadcom/compiler/vir_opt_dead_code.c index 1f9e504e6be..7ce05fb5f51 100644 --- a/src/broadcom/compiler/vir_opt_dead_code.c +++ b/src/broadcom/compiler/vir_opt_dead_code.c @@ -49,6 +49,8 @@ dce(struct v3d_compile *c, struct qinst *inst) } assert(inst->qpu.flags.apf == V3D_QPU_PF_NONE); assert(inst->qpu.flags.mpf == V3D_QPU_PF_NONE); + assert(inst->qpu.flags.auf == V3D_QPU_UF_NONE); + assert(inst->qpu.flags.muf == V3D_QPU_UF_NONE); vir_remove_instruction(c, inst); } @@ -108,7 +110,9 @@ vir_opt_dead_code(struct v3d_compile *c) continue; if (inst->qpu.flags.apf != V3D_QPU_PF_NONE || - inst->qpu.flags.mpf != V3D_QPU_PF_NONE|| + inst->qpu.flags.mpf != V3D_QPU_PF_NONE || + inst->qpu.flags.auf != V3D_QPU_UF_NONE || + inst->qpu.flags.muf != V3D_QPU_UF_NONE || has_nonremovable_reads(c, inst)) { /* If we can't remove the instruction, but we * don't need its destination value, just -- 2.30.2