diff options
author | Andrew Trick <atrick@apple.com> | 2013-07-30 19:59:08 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-07-30 19:59:08 +0000 |
commit | 1e46fcd9891897f4fef8d8404214a7c9b6db158b (patch) | |
tree | 93a5d50220ddbc2d38245672a0947a3113d24772 /lib/CodeGen | |
parent | 8717679c449db5555ec0ce2873bbbe53106f4c88 (diff) | |
download | llvm-1e46fcd9891897f4fef8d8404214a7c9b6db158b.tar.gz llvm-1e46fcd9891897f4fef8d8404214a7c9b6db158b.tar.bz2 llvm-1e46fcd9891897f4fef8d8404214a7c9b6db158b.tar.xz |
MI Sched fix: assert "Disconnected LRG within the scheduling region."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187435 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/MachineScheduler.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineScheduler.cpp b/lib/CodeGen/MachineScheduler.cpp index 4e3cc3c5d4..b088d1ad17 100644 --- a/lib/CodeGen/MachineScheduler.cpp +++ b/lib/CodeGen/MachineScheduler.cpp @@ -1017,6 +1017,12 @@ void CopyConstrain::constrainLocalCopy(SUnit *CopySU, ScheduleDAGMI *DAG) { GlobalSegment->start)) { return; } + // If the prior global segment may be defined by the same two-address + // instruction that also defines LocalLI, then can't make a hole here. + if (SlotIndex::isSameInstr(llvm::prior(GlobalSegment)->start, + LocalLI->beginIndex())) { + return; + } // If GlobalLI has a prior segment, it must be live into the EBB. Otherwise // it would be a disconnected component in the live range. assert(llvm::prior(GlobalSegment)->start < LocalLI->beginIndex() && |