diff options
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index 56f38aca500..7d83ec9d1db 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -5214,6 +5214,12 @@ AArch64InstrInfo::getOutliningCandidateInfo( } else { SetCandidateCallInfo(MachineOutlinerDefault, 12); } + + // If we dropped all of the candidates, bail out here. + if (RepeatedSequenceLocs.size() < 2) { + RepeatedSequenceLocs.clear(); + return outliner::OutlinedFunction(); + } } // Does every candidate's MBB contain a call? If so, then we might have a call |

