summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2007-08-29 19:28:29 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2007-08-29 19:28:29 +0000
commit830b1cb4e9badb32b5497998bfd0da2ec1b66748 (patch)
tree083edd07d97056974e295c77a849fc06795ae5c9 /llvm/lib/CodeGen
parent7741427a09bce23b52a157fab34387386464e849 (diff)
downloadbcm5719-llvm-830b1cb4e9badb32b5497998bfd0da2ec1b66748.tar.gz
bcm5719-llvm-830b1cb4e9badb32b5497998bfd0da2ec1b66748.zip
Lower FRAME_TO_ADDR_OFFSET to zero by default (if not custom lowered)
llvm-svn: 41578
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 8e4d09af110..8baef4b1d45 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -733,7 +733,6 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
break;
case ISD::FRAMEADDR:
case ISD::RETURNADDR:
- case ISD::FRAME_TO_ARGS_OFFSET:
// The only option for these nodes is to custom lower them. If the target
// does not custom lower them, then return zero.
Tmp1 = TLI.LowerOperation(Op, DAG);
@@ -742,6 +741,19 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
else
Result = DAG.getConstant(0, TLI.getPointerTy());
break;
+ case ISD::FRAME_TO_ARGS_OFFSET:
+ MVT::ValueType VT = Node->getValueType(0);
+ switch (TLI.getOperationAction(Node->getOpcode(), VT)) {
+ default: assert(0 && "This action is not supported yet!");
+ case TargetLowering::Custom:
+ Result = TLI.LowerOperation(Op, DAG);
+ if (Result.Val) break;
+ // Fall Thru
+ case TargetLowering::Legal:
+ Result = DAG.getConstant(0, VT);
+ break;
+ }
+ break;
case ISD::EXCEPTIONADDR: {
Tmp1 = LegalizeOp(Node->getOperand(0));
MVT::ValueType VT = Node->getValueType(0);
OpenPOWER on IntegriCloud