mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 01:14:12 +00:00
Allow targets to custom legalize leaf nodes like GlobalAddress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24387 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2823b3e70e
commit
0c8fbe33a4
@ -532,7 +532,19 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||
case ISD::CONDCODE:
|
||||
case ISD::VALUETYPE:
|
||||
case ISD::SRCVALUE:
|
||||
assert(isTypeLegal(Node->getValueType(0)) && "This must be legal!");
|
||||
switch (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0))) {
|
||||
default: assert(0 && "This action is not supported yet!");
|
||||
case TargetLowering::Custom: {
|
||||
SDOperand Tmp = TLI.LowerOperation(Op, DAG);
|
||||
if (Tmp.Val) {
|
||||
Result = LegalizeOp(Tmp);
|
||||
break;
|
||||
}
|
||||
} // FALLTHROUGH if the target doesn't want to lower this op after all.
|
||||
case TargetLowering::Legal:
|
||||
assert(isTypeLegal(Node->getValueType(0)) && "This must be legal!");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ISD::AssertSext:
|
||||
case ISD::AssertZext:
|
||||
|
Loading…
Reference in New Issue
Block a user