From: Eric Anholt Date: Fri, 12 Jan 2018 23:34:22 +0000 (-0800) Subject: broadcom/vc5: Also check the update flags for avoiding DCE. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e4cba9d92fff72899390f62285c4f90c289bdc2;p=mesa.git broadcom/vc5: Also check the update flags for avoiding DCE. I was trying to do a NULL-destination UF, and it got removed. --- 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