diff options
| author | Jessica Paquette <jpaquette@apple.com> | 2018-07-27 18:21:57 +0000 |
|---|---|---|
| committer | Jessica Paquette <jpaquette@apple.com> | 2018-07-27 18:21:57 +0000 |
| commit | 9d93c6026a61507db25e8615d82a2576bdc8b319 (patch) | |
| tree | 5e224cb511db3f64b7223560fd40ef18310e80e4 /llvm/lib/Target | |
| parent | fcca45f0ddb94947009615029bfd480e649abd64 (diff) | |
| download | bcm5719-llvm-9d93c6026a61507db25e8615d82a2576bdc8b319.tar.gz bcm5719-llvm-9d93c6026a61507db25e8615d82a2576bdc8b319.zip | |
[MachineOutliner] Exit getOutliningCandidateInfo when we erase all candidates
There was a missing check for if a candidate list was entirely deleted. This
adds that check.
This fixes an asan failure caused by running test/CodeGen/AArch64/addsub_ext.ll
with the MachineOutliner enabled.
llvm-svn: 338148
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index dc3fa4f8c1d..230480cf1ce 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -4967,6 +4967,10 @@ AArch64InstrInfo::getOutliningCandidateInfo( CantGuaranteeValueAcrossCall), RepeatedSequenceLocs.end()); + // If the sequence is empty, we're done. + if (RepeatedSequenceLocs.empty()) + return outliner::OutlinedFunction(); + // At this point, we have only "safe" candidates to outline. Figure out // frame + call instruction information. |

