Follow the same routine to add target float expansion hook

llvm-svn: 165707
This commit is contained in:
Michael Liao 2012-10-11 07:22:01 +00:00
parent eb18262908
commit 6b49c2f69c
1 changed files with 21 additions and 23 deletions

View File

@ -1245,17 +1245,16 @@ bool DAGTypeLegalizer::ExpandFloatOperand(SDNode *N, unsigned OpNo) {
DEBUG(dbgs() << "Expand float operand: "; N->dump(&DAG); dbgs() << "\n"); DEBUG(dbgs() << "Expand float operand: "; N->dump(&DAG); dbgs() << "\n");
SDValue Res = SDValue(); SDValue Res = SDValue();
if (TLI.getOperationAction(N->getOpcode(), N->getOperand(OpNo).getValueType()) // See if the target wants to custom expand this node.
== TargetLowering::Custom) if (CustomLowerNode(N, N->getOperand(OpNo).getValueType(), false))
Res = TLI.LowerOperation(SDValue(N, 0), DAG); return false;
if (Res.getNode() == 0) {
switch (N->getOpcode()) { switch (N->getOpcode()) {
default: default:
#ifndef NDEBUG #ifndef NDEBUG
dbgs() << "ExpandFloatOperand Op #" << OpNo << ": "; dbgs() << "ExpandFloatOperand Op #" << OpNo << ": ";
N->dump(&DAG); dbgs() << "\n"; N->dump(&DAG); dbgs() << "\n";
#endif #endif
llvm_unreachable("Do not know how to expand this operator's operand!"); llvm_unreachable("Do not know how to expand this operator's operand!");
case ISD::BITCAST: Res = ExpandOp_BITCAST(N); break; case ISD::BITCAST: Res = ExpandOp_BITCAST(N); break;
@ -1271,7 +1270,6 @@ bool DAGTypeLegalizer::ExpandFloatOperand(SDNode *N, unsigned OpNo) {
case ISD::STORE: Res = ExpandFloatOp_STORE(cast<StoreSDNode>(N), case ISD::STORE: Res = ExpandFloatOp_STORE(cast<StoreSDNode>(N),
OpNo); break; OpNo); break;
} }
}
// If the result is null, the sub-method took care of registering results etc. // If the result is null, the sub-method took care of registering results etc.
if (!Res.getNode()) return false; if (!Res.getNode()) return false;