summaryrefslogtreecommitdiffstats
path: root/src/broadcom/compiler
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-01-12 15:34:22 -0800
committerEric Anholt <[email protected]>2018-01-12 21:58:11 -0800
commit8e4cba9d92fff72899390f62285c4f90c289bdc2 (patch)
tree10e8cd04c58ed0c47d37fbb1e8eded02260d240b /src/broadcom/compiler
parentff77ca8a3b67f6209af5d70711004cd1937bd711 (diff)
broadcom/vc5: Also check the update flags for avoiding DCE.
I was trying to do a NULL-destination UF, and it got removed.
Diffstat (limited to 'src/broadcom/compiler')
-rw-r--r--src/broadcom/compiler/vir_opt_dead_code.c6
1 files changed, 5 insertions, 1 deletions
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