From 817a7eb588c7d6536cb469f4ca7447b49268bc00 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 16:34:01 +0100 Subject: [PATCH] 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 --- src/gallium/drivers/vc4/vc4_opt_cse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/vc4/vc4_opt_cse.c b/src/gallium/drivers/vc4/vc4_opt_cse.c index 0e5480e..8b4d429 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; -- 2.7.4