summaryrefslogtreecommitdiff
path: root/lib/Target/XCore
diff options
context:
space:
mode:
authorRobert Lytton <robert@xmos.com>2013-11-12 10:11:35 +0000
committerRobert Lytton <robert@xmos.com>2013-11-12 10:11:35 +0000
commit47a4349eb659e021899348f009650b9cadaf0de2 (patch)
treef99219c5bd092d054ed1b6ae8d25910eda955222 /lib/Target/XCore
parent092815ce4be4a57d1520e73fdaaa95933aa38f81 (diff)
downloadllvm-47a4349eb659e021899348f009650b9cadaf0de2.tar.gz
llvm-47a4349eb659e021899348f009650b9cadaf0de2.tar.bz2
llvm-47a4349eb659e021899348f009650b9cadaf0de2.tar.xz
XCore target: fix bug in aligning 'byval i8*' on the stack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194466 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore')
-rw-r--r--lib/Target/XCore/XCoreISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/XCore/XCoreISelLowering.cpp b/lib/Target/XCore/XCoreISelLowering.cpp
index 149652ff73..a382a189cf 100644
--- a/lib/Target/XCore/XCoreISelLowering.cpp
+++ b/lib/Target/XCore/XCoreISelLowering.cpp
@@ -1224,7 +1224,7 @@ XCoreTargetLowering::LowerCCCArguments(SDValue Chain,
ArgDI != ArgDE; ++ArgDI) {
if (ArgDI->Flags.isByVal() && ArgDI->Flags.getByValSize()) {
unsigned Size = ArgDI->Flags.getByValSize();
- unsigned Align = ArgDI->Flags.getByValAlign();
+ unsigned Align = std::max(StackSlotSize, ArgDI->Flags.getByValAlign());
// Create a new object on the stack and copy the pointee into it.
int FI = MFI->CreateStackObject(Size, Align, false, false);
SDValue FIN = DAG.getFrameIndex(FI, MVT::i32);