vc4: Only copy propagate raw MOVs.
authorEric Anholt <eric@anholt.net>
Sun, 25 Oct 2015 00:49:03 +0000 (17:49 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 26 Oct 2015 23:48:34 +0000 (16:48 -0700)
No problems being fixed, but needed for the new unpack changes.

src/gallium/drivers/vc4/vc4_opt_copy_propagation.c

index fd2539a..b46be24 100644 (file)
@@ -45,14 +45,9 @@ qir_opt_copy_propagation(struct vc4_compile *c)
                         int index = inst->src[i].index;
                         if (inst->src[i].file == QFILE_TEMP &&
                             c->defs[index] &&
-                            c->defs[index]->op == QOP_MOV &&
+                            qir_is_raw_mov(c->defs[index]) &&
                             (c->defs[index]->src[0].file == QFILE_TEMP ||
                              c->defs[index]->src[0].file == QFILE_UNIF)) {
-                                /* If it has a pack, it shouldn't be an SSA
-                                 * def.
-                                 */
-                                assert(!c->defs[index]->dst.pack);
-
                                 if (debug) {
                                         fprintf(stderr, "Copy propagate: ");
                                         qir_dump_inst(c, inst);