summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-07-31 20:56:42 +0200
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-08-05 00:50:00 +0200
commit2c695d38e6b194572becf82300fba5e34b1fd7d7 (patch)
treed60c5394254de474c3f469353806dec592764338 /src/gallium/drivers
parentfa67cabe7a9f1343e96c7c8a105e82dc05e3de44 (diff)
nv50: don't eliminate loads to dedicated values
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv50/nv50_pc_optimize.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/drivers/nv50/nv50_pc_optimize.c b/src/gallium/drivers/nv50/nv50_pc_optimize.c
index 1f2f1630f4..324f8bb2da 100644
--- a/src/gallium/drivers/nv50/nv50_pc_optimize.c
+++ b/src/gallium/drivers/nv50/nv50_pc_optimize.c
@@ -639,12 +639,10 @@ nv_pass_reload_elim(struct nv_pass_reld_elim *ctx, struct nv_basic_block *b)
break;
if (it) {
-#if 1
- nvcg_replace_value(ctx->pc, ld->def[0], it->value);
-#else
- ld->opcode = NV_OP_MOV;
- nv_reference(ctx->pc, &ld->src[0], it->value);
-#endif
+ if (ld->def[0]->reg.id >= 0)
+ it->value = ld->def[0];
+ else
+ nvcg_replace_value(ctx->pc, ld->def[0], it->value);
} else {
if (ctx->alloc == LOAD_RECORD_POOL_SIZE)
continue;