summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2010-09-01 12:41:59 +0200
committerChristoph Bumiller <[email protected]>2010-09-01 18:02:50 +0200
commit8e6ba3c8cc41701b4391d0772bf2318604972ae9 (patch)
tree22789a20f6ed079b407f7479900d0dc235171ccd /src
parente08f70a41d1012a0270468866614485a3415168e (diff)
nv50: must join SELECT inputs before MOV inputs
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nv50/nv50_pc_regalloc.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/gallium/drivers/nv50/nv50_pc_regalloc.c b/src/gallium/drivers/nv50/nv50_pc_regalloc.c
index e689d349f1d..d401706b5bc 100644
--- a/src/gallium/drivers/nv50/nv50_pc_regalloc.c
+++ b/src/gallium/drivers/nv50/nv50_pc_regalloc.c
@@ -480,18 +480,18 @@ pass_join_values(struct nv_pc_pass *ctx, int iter)
switch (i->opcode) {
case NV_OP_PHI:
- if (!iter)
- continue;
+ if (iter != 2)
+ break;
for (c = 0; c < 4 && i->src[c]; ++c)
try_join_values(ctx, i->def[0], i->src[c]->value);
break;
case NV_OP_MOV:
- if (iter && i->src[0]->value->insn &&
+ if ((iter == 2) && i->src[0]->value->insn &&
!nv_is_vector_op(i->src[0]->value->join->insn->opcode))
try_join_values(ctx, i->def[0], i->src[0]->value);
break;
case NV_OP_SELECT:
- if (!iter)
+ if (iter != 1)
break;
for (c = 0; c < 4 && i->src[c]; ++c) {
assert(join_allowed(ctx, i->def[0], i->src[c]->value));
@@ -919,15 +919,21 @@ nv_pc_exec_pass1(struct nv_pc *pc)
livei_print(&pc->values[i]);
#endif
- for (i = 0; i < 2; ++i) {
- ret = pass_join_values(ctx, i);
- if (ret)
- goto out;
- ret = pass_linear_scan(ctx, i);
- if (ret)
- goto out;
- }
- assert(!ret && "joining");
+ ret = pass_join_values(ctx, 0);
+ if (ret)
+ goto out;
+ ret = pass_linear_scan(ctx, 0);
+ if (ret)
+ goto out;
+ ret = pass_join_values(ctx, 1);
+ if (ret)
+ goto out;
+ ret = pass_join_values(ctx, 2);
+ if (ret)
+ goto out;
+ ret = pass_linear_scan(ctx, 1);
+ if (ret)
+ goto out;
for (i = 0; i < pc->num_values; ++i)
livei_release(&pc->values[i]);