mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-29 22:52:18 +00:00
ByVal frame object size should be that of the byval argument, not the size of the type which is just a pointer. This is not known to break stuff but is wrong nevertheless.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95163 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ac7798e906
commit
90567c3560
@ -1471,13 +1471,17 @@ X86TargetLowering::LowerMemArgument(SDValue Chain,
|
||||
// changed with more analysis.
|
||||
// In case of tail call optimization mark all arguments mutable. Since they
|
||||
// could be overwritten by lowering of arguments in case of a tail call.
|
||||
int FI = MFI->CreateFixedObject(ValVT.getSizeInBits()/8,
|
||||
VA.getLocMemOffset(), isImmutable, false);
|
||||
SDValue FIN = DAG.getFrameIndex(FI, getPointerTy());
|
||||
if (Flags.isByVal())
|
||||
return FIN;
|
||||
return DAG.getLoad(ValVT, dl, Chain, FIN,
|
||||
PseudoSourceValue::getFixedStack(FI), 0);
|
||||
if (Flags.isByVal()) {
|
||||
int FI = MFI->CreateFixedObject(Flags.getByValSize(),
|
||||
VA.getLocMemOffset(), isImmutable, false);
|
||||
return DAG.getFrameIndex(FI, getPointerTy());
|
||||
} else {
|
||||
int FI = MFI->CreateFixedObject(ValVT.getSizeInBits()/8,
|
||||
VA.getLocMemOffset(), isImmutable, false);
|
||||
SDValue FIN = DAG.getFrameIndex(FI, getPointerTy());
|
||||
return DAG.getLoad(ValVT, dl, Chain, FIN,
|
||||
PseudoSourceValue::getFixedStack(FI), 0);
|
||||
}
|
||||
}
|
||||
|
||||
SDValue
|
||||
|
Loading…
x
Reference in New Issue
Block a user