diff options
author | Tim Northover <tnorthover@apple.com> | 2017-08-17 23:14:01 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2017-08-17 23:14:01 +0000 |
commit | 48fff995d62b227e742c53f472c04e8ac11a3ede (patch) | |
tree | c774b27eae44f2dffaa6a904c5c538e89d1d0879 /llvm/lib | |
parent | dea43983ae0efb1cde6ea7e76cc8730407656b74 (diff) | |
download | bcm5719-llvm-48fff995d62b227e742c53f472c04e8ac11a3ede.tar.gz bcm5719-llvm-48fff995d62b227e742c53f472c04e8ac11a3ede.zip |
GlobalISel (AArch64): fix ABI at border between GPRs and SP.
If a struct would end up half in GPRs and half on SP the ABI says it should
actually go entirely on the stack. We were getting this wrong in GlobalISel
before, causing compatibility issues.
llvm-svn: 311137
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64CallLowering.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64CallLowering.cpp b/llvm/lib/Target/AArch64/AArch64CallLowering.cpp index fc09763ed38..a0ef3262483 100644 --- a/llvm/lib/Target/AArch64/AArch64CallLowering.cpp +++ b/llvm/lib/Target/AArch64/AArch64CallLowering.cpp @@ -188,12 +188,16 @@ void AArch64CallLowering::splitToValueTypes( } unsigned FirstRegIdx = SplitArgs.size(); + bool AlreadySplit = false; for (auto SplitVT : SplitVTs) { - // FIXME: set split flags if they're actually used (e.g. i128 on AAPCS). Type *SplitTy = SplitVT.getTypeForEVT(Ctx); SplitArgs.push_back( ArgInfo{MRI.createGenericVirtualRegister(getLLTForType(*SplitTy, DL)), SplitTy, OrigArg.Flags, OrigArg.IsFixed}); + if (!AlreadySplit) { + SplitArgs.back().Flags.setSplit(); + AlreadySplit = true; + } } for (unsigned i = 0; i < Offsets.size(); ++i) |