mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-30 06:40:53 +00:00
Do not change the size of function arguments. PR 1489.
llvm-svn: 37496
This commit is contained in:
parent
5c0808db4f
commit
0f3c011fd5
@ -3993,7 +3993,15 @@ TargetLowering::LowerCallTo(SDOperand Chain, const Type *RetTy,
|
|||||||
Op = DAG.getNode(ExtOp, getTypeToTransformTo(VT), Op);
|
Op = DAG.getNode(ExtOp, getTypeToTransformTo(VT), Op);
|
||||||
} else {
|
} else {
|
||||||
assert(MVT::isFloatingPoint(VT) && "Not int or FP?");
|
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(Op);
|
||||||
Ops.push_back(DAG.getConstant(Flags, MVT::i32));
|
Ops.push_back(DAG.getConstant(Flags, MVT::i32));
|
||||||
|
Loading…
Reference in New Issue
Block a user