diff options
author | Tim Northover <tnorthover@apple.com> | 2014-06-10 09:52:40 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-06-10 09:52:40 +0000 |
commit | 292c7c6a4886e3c7a99e4ef11fbbeea6b5997edc (patch) | |
tree | e10dbe65f32866ceff22da7f83e8f1b561639f4d /lib/Target/AArch64 | |
parent | 48a7c150fca9997999c3c10527e2d11da6d5c4b1 (diff) | |
download | llvm-292c7c6a4886e3c7a99e4ef11fbbeea6b5997edc.tar.gz llvm-292c7c6a4886e3c7a99e4ef11fbbeea6b5997edc.tar.bz2 llvm-292c7c6a4886e3c7a99e4ef11fbbeea6b5997edc.tar.xz |
AArch64: make FastISel memcpy emission more robust.
We were hitting an assert if FastISel couldn't create the load or store we
requested. Currently this happens for large frame-local addresses, though
CodeGen could be improved there.
rdar://problem/17187463
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210519 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64')
-rw-r--r-- | lib/Target/AArch64/AArch64FastISel.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/AArch64/AArch64FastISel.cpp b/lib/Target/AArch64/AArch64FastISel.cpp index c84889e1f9..f3beef4ecb 100644 --- a/lib/Target/AArch64/AArch64FastISel.cpp +++ b/lib/Target/AArch64/AArch64FastISel.cpp @@ -1460,10 +1460,12 @@ bool AArch64FastISel::TryEmitSmallMemCpy(Address Dest, Address Src, bool RV; unsigned ResultReg; RV = EmitLoad(VT, ResultReg, Src); - assert(RV == true && "Should be able to handle this load."); + if (!RV) + return false; + RV = EmitStore(VT, ResultReg, Dest); - assert(RV == true && "Should be able to handle this store."); - (void)RV; + if (!RV) + return false; int64_t Size = VT.getSizeInBits() / 8; Len -= Size; |