nv50/ir/ra: don't coalesce contraint-moves

This could lead to incorrect code when fixed regs are involved.

Surprisingly, the increased freedom actually leads to lower
register usage in some cases. Still want to find a better way
to treat constraints though ...
This commit is contained in:
Christoph Bumiller
2012-01-07 21:00:51 +01:00
parent 601fb4b746
commit 4021979182
@@ -513,6 +513,10 @@ RegAlloc::coalesceValues(unsigned int mask)
case OP_MOV:
if (!(mask & JOIN_MASK_MOV))
break;
i = insn->getDef(0)->uses ? insn->getDef(0)->uses->getInsn() : NULL;
// if this is a contraint-move there will only be a single use
if (i && i->op == OP_CONSTRAINT)
break;
i = insn->getSrc(0)->getUniqueInsn();
if (i && !i->constrainedDefs())
insn->getDef(0)->coalesce(insn->getSrc(0), false);