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 | c19445d07a539a1522e87b83b6b446bfcf25fc0e (patch) | |
tree | 33cff3d8fd2594630d66cb874d425805cb1a72fc /llvm/lib/Target/AArch64/AArch64FastISel.cpp | |
parent | c726c367f4fe33e4671d8695bfcc1b7b1bb0d112 (diff) | |
download | bcm5719-llvm-c19445d07a539a1522e87b83b6b446bfcf25fc0e.tar.gz bcm5719-llvm-c19445d07a539a1522e87b83b6b446bfcf25fc0e.zip |
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
llvm-svn: 210519
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64FastISel.cpp')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64FastISel.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64FastISel.cpp b/llvm/lib/Target/AArch64/AArch64FastISel.cpp index c84889e1f9d..f3beef4ecb6 100644 --- a/llvm/lib/Target/AArch64/AArch64FastISel.cpp +++ b/llvm/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; |