vc4: When emitting an instruction to an existing temp, mark it non-SSA.
authorEric Anholt <eric@anholt.net>
Mon, 2 May 2016 19:36:56 +0000 (12:36 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 6 May 2016 17:25:55 +0000 (10:25 -0700)
Prevents a bug in the later control-flow support series.

src/gallium/drivers/vc4/vc4_qir.h

index 7ea6ec8a50f5bcc72a6f6316206bce38ef369e92..04ca8ed7f4b10f954bc0bc67d35df55df284b2b1 100644 (file)
@@ -533,6 +533,8 @@ static inline struct qinst *                                             \
 qir_##name##_dest(struct vc4_compile *c, struct qreg dest,               \
                   struct qreg a)                                         \
 {                                                                        \
+        if (dest.file == QFILE_TEMP)                                     \
+                c->defs[dest.index] = NULL;                              \
         return qir_emit_nodef(c, qir_inst(QOP_##name, dest, a,           \
                                           c->undef));                    \
 }