diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-06-28 19:39:57 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-06-28 19:39:57 +0000 |
| commit | ffd628ec0a64e5f4c8bdfa49f87abc61a91b6035 (patch) | |
| tree | af0fcee389d0f91eec4744951925788a4a78d6fc | |
| parent | 0117091c16b0399beb21cb02b4e91f58b9ff4985 (diff) | |
| download | bcm5719-llvm-ffd628ec0a64e5f4c8bdfa49f87abc61a91b6035.tar.gz bcm5719-llvm-ffd628ec0a64e5f4c8bdfa49f87abc61a91b6035.zip | |
After physreg coalescing, physical registers might not have live ranges where
you would expect.
Don't assert on that case, just give up.
This fixes PR7513.
llvm-svn: 107046
| -rw-r--r-- | llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp index b068f316b66..5f4ef5b3b1c 100644 --- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -122,7 +122,8 @@ bool SimpleRegisterCoalescing::AdjustCopiesBackFrom(const CoalescerPair &CP, // AValNo is the value number in A that defines the copy, A3 in the example. SlotIndex CopyUseIdx = CopyIdx.getUseIndex(); LiveInterval::iterator ALR = IntA.FindLiveRangeContaining(CopyUseIdx); - assert(ALR != IntA.end() && "Live range not found!"); + // The live range might not exist after fun with physreg coalescing. + if (ALR == IntA.end()) return false; VNInfo *AValNo = ALR->valno; // If it's re-defined by an early clobber somewhere in the live range, then // it's not safe to eliminate the copy. FIXME: This is a temporary workaround. |

