mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-03 09:21:13 +00:00
Add support for patterns that have physical registers in them. Testcase:
def : Pat<(trunc G8RC:$in), (OR8To4 G8RC:$in, X0)>; Even though this doesn't make any sense on PPC :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23815 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ab1bf27be5
commit
4c59309f59
@ -1617,6 +1617,18 @@ CodeGenPatternResult(TreePatternNode *N, unsigned &Ctr,
|
||||
}
|
||||
|
||||
if (N->isLeaf()) {
|
||||
// If this is an explicit register reference, handle it.
|
||||
if (DefInit *DI = dynamic_cast<DefInit*>(N->getLeafValue())) {
|
||||
unsigned ResNo = Ctr++;
|
||||
if (DI->getDef()->isSubClassOf("Register")) {
|
||||
OS << " SDOperand Tmp" << ResNo << " = CurDAG->getRegister("
|
||||
<< getQualifiedName(DI->getDef()) << ", MVT::"
|
||||
<< getEnumName(N->getType())
|
||||
<< ");\n";
|
||||
return ResNo;
|
||||
}
|
||||
}
|
||||
|
||||
N->dump();
|
||||
assert(0 && "Unknown leaf type!");
|
||||
return ~0U;
|
||||
|
Loading…
Reference in New Issue
Block a user