summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-03-22 11:51:52 +0100
committerChristoph Bumiller <[email protected]>2012-04-14 21:54:02 +0200
commit44e84d6f161e95d44d847440b3bc6d670c242cd7 (patch)
tree7c99e858766d8120dca5df6e8080505b7ae203fb /src/gallium/drivers/nv50
parentca1fc2b86400e3fc9dd0517863e22721b5e91c77 (diff)
nv50/ir/opt: don't copy-propagate cond MOVs or MOVs to other reg files
We've never encountered the latter on nvc0, but on nv50 we have moves between GPRs and address regs.
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
index 5f974436e94..35ddca34b19 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
@@ -97,6 +97,10 @@ CopyPropagation::visit(BasicBlock *bb)
next = mov->next;
if (mov->op != OP_MOV || mov->fixed || !mov->getSrc(0)->asLValue())
continue;
+ if (mov->getPredicate())
+ continue;
+ if (mov->def(0).getFile() != mov->src(0).getFile())
+ continue;
si = mov->getSrc(0)->getInsn();
if (mov->getDef(0)->reg.data.id < 0 && si && si->op != OP_PHI) {
// propagate