summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-08-24 18:00:44 -0700
committerEric Anholt <eric@anholt.net>2014-09-04 11:39:51 -0700
commit3972a6f057e20ec9e8358f4487c3b4d51c499628 (patch)
tree55f25f4f59fc588b2ac985f1663b446c6d67c870
parent511d2f9a133f95e0ab01de2aa05acdb23fb588d4 (diff)
vc4: Stop being so clever in CMP handling.
This kind of cleverness should be in a general merging-of-ADD-and-MUL instruction scheduler, rather than individual opcodes.
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu_emit.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c
index 9f5ccdb0cf..4e28ff7c3b 100644
--- a/src/gallium/drivers/vc4/vc4_qpu_emit.c
+++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c
@@ -369,30 +369,13 @@ vc4_generate_code(struct qcompile *c)
queue(c, qpu_a_MOV(qpu_ra(QPU_W_NOP), src[0]));
*last_inst(c) |= QPU_SF;
- if (dst.mux <= QPU_MUX_R3) {
- fixup_raddr_conflict(c, src[1], &src[2]);
- queue(c, qpu_inst(qpu_a_MOV(dst, src[1]),
- qpu_m_MOV(dst, src[2])));
- *last_inst(c) = qpu_set_cond_add(*last_inst(c),
- QPU_COND_NS);
- *last_inst(c) = qpu_set_cond_mul(*last_inst(c),
- QPU_COND_NC);
- } else {
- if (dst.mux == src[1].mux &&
- dst.addr == src[1].addr) {
- queue(c, qpu_a_MOV(dst, src[1]));
-
- queue(c, qpu_a_MOV(dst, src[2]));
- *last_inst(c) = qpu_set_cond_add(*last_inst(c),
- QPU_COND_NC);
- } else {
- queue(c, qpu_a_MOV(dst, src[2]));
+ queue(c, qpu_a_MOV(dst, src[1]));
+ *last_inst(c) = qpu_set_cond_add(*last_inst(c),
+ QPU_COND_NS);
- queue(c, qpu_a_MOV(dst, src[1]));
- *last_inst(c) = qpu_set_cond_add(*last_inst(c),
- QPU_COND_NS);
- }
- }
+ queue(c, qpu_a_MOV(dst, src[2]));
+ *last_inst(c) = qpu_set_cond_add(*last_inst(c),
+ QPU_COND_NC);
break;
case QOP_SEQ: