mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Don't force promotion of return arguments on the callee.
Some architectures (like x86) don't require it. This fixes bug 3779. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67132 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -979,15 +979,6 @@ void SelectionDAGLowering::visitRet(ReturnInst &I) {
|
||||
for (unsigned j = 0, f = NumValues; j != f; ++j) {
|
||||
MVT VT = ValueVTs[j];
|
||||
|
||||
// FIXME: C calling convention requires the return type to be promoted to
|
||||
// at least 32-bit. But this is not necessary for non-C calling
|
||||
// conventions.
|
||||
if (VT.isInteger()) {
|
||||
MVT MinVT = TLI.getRegisterType(MVT::i32);
|
||||
if (VT.bitsLT(MinVT))
|
||||
VT = MinVT;
|
||||
}
|
||||
|
||||
unsigned NumParts = TLI.getNumRegisters(VT);
|
||||
MVT PartVT = TLI.getRegisterType(VT);
|
||||
SmallVector<SDValue, 4> Parts(NumParts);
|
||||
|
Reference in New Issue
Block a user