diff options
author | Dale Johannesen <dalej@apple.com> | 2007-06-07 21:07:15 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-06-07 21:07:15 +0000 |
commit | 9a4d987a5f6685b5a5c9f6ef11db7b07b2bd0d12 (patch) | |
tree | 6450a98d274b19ad78b153f25e410556ddd20d11 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 5b8a5516e41edfbaae063257377e190bac73d820 (diff) | |
download | bcm5719-llvm-9a4d987a5f6685b5a5c9f6ef11db7b07b2bd0d12.tar.gz bcm5719-llvm-9a4d987a5f6685b5a5c9f6ef11db7b07b2bd0d12.zip |
Do not change the size of function arguments. PR 1489.
llvm-svn: 37496
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index ac89b179e13..f97ee721515 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -3993,7 +3993,15 @@ TargetLowering::LowerCallTo(SDOperand Chain, const Type *RetTy, Op = DAG.getNode(ExtOp, getTypeToTransformTo(VT), Op); } else { assert(MVT::isFloatingPoint(VT) && "Not int or FP?"); - Op = DAG.getNode(ISD::FP_EXTEND, getTypeToTransformTo(VT), Op); + // A true promotion would change the size of the argument. + // Instead, pretend this is an int. If FP objects are not + // passed the same as ints, the original type should be Legal + // and we should not get here. + Op = DAG.getNode(ISD::BIT_CONVERT, + VT==MVT::f32 ? MVT::i32 : + (VT==MVT::f64 ? MVT::i64 : + MVT::Other), + Op); } Ops.push_back(Op); Ops.push_back(DAG.getConstant(Flags, MVT::i32)); |