aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_opt_cse.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-10-23 16:34:01 +0100
committerEric Anholt <[email protected]>2015-10-23 18:11:21 +0100
commit817a7eb588c7d6536cb469f4ca7447b49268bc00 (patch)
treed8712494f4d2d5ec5bd1b4f0454a622ca1c8546a /src/gallium/drivers/vc4/vc4_opt_cse.c
parent5b2fb138bc5ff68af27d8435cbc01f83a09ee078 (diff)
vc4: Don't try to CSE non-SSA instructions.
This can happen when we're doing destination packing -- we don't know what's in the rest of the register. Signed-off-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_opt_cse.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_opt_cse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_opt_cse.c b/src/gallium/drivers/vc4/vc4_opt_cse.c
index 0e5480ea781..8b4d429074c 100644
--- a/src/gallium/drivers/vc4/vc4_opt_cse.c
+++ b/src/gallium/drivers/vc4/vc4_opt_cse.c
@@ -65,6 +65,7 @@ vc4_find_cse(struct vc4_compile *c, struct hash_table *ht,
struct qinst *inst, uint32_t sf_count)
{
if (inst->dst.file != QFILE_TEMP ||
+ !c->defs[inst->dst.index] ||
inst->op == QOP_MOV ||
qir_get_op_nsrc(inst->op) > 4) {
return NULL;