forked from OSchip/llvm-project
Be more clever about regclasses in ScheduleDAGSDNodes::EmitCopyFromReg.
If two uses of a CopyFromReg want different regclasses, first try a common sub-class, then fall back on the copy emitted in AddRegisterOperand. There is no need for an assert here. The cross-class joiner usually cleans up nicely. llvm-svn: 79193
This commit is contained in:
parent
2ba5ca9d4f
commit
7f91fee62b
|
@ -81,11 +81,11 @@ EmitCopyFromReg(SDNode *Node, unsigned ResNo, bool IsClone, bool IsCloned,
|
||||||
if (!UseRC)
|
if (!UseRC)
|
||||||
UseRC = RC;
|
UseRC = RC;
|
||||||
else if (RC) {
|
else if (RC) {
|
||||||
if (UseRC->hasSuperClass(RC))
|
const TargetRegisterClass *ComRC = getCommonSubClass(UseRC, RC);
|
||||||
UseRC = RC;
|
// If multiple uses expect disjoint register classes, we emit
|
||||||
else
|
// copies in AddRegisterOperand.
|
||||||
assert((UseRC == RC || RC->hasSuperClass(UseRC)) &&
|
if (ComRC)
|
||||||
"Multiple uses expecting different register classes!");
|
UseRC = ComRC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue