summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalUnion.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-17 23:16:38 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-17 23:16:38 +0000
commitcf846100d8c1ef3f3a6b914656e480ad9776bfe5 (patch)
tree1f87f6a887c6b31afcb727a3c31591a6345461dd /llvm/lib/CodeGen/LiveIntervalUnion.cpp
parent2e98ee31b3c013dff3cbffa2a2b8a885ec18b2cb (diff)
downloadbcm5719-llvm-cf846100d8c1ef3f3a6b914656e480ad9776bfe5.tar.gz
bcm5719-llvm-cf846100d8c1ef3f3a6b914656e480ad9776bfe5.zip
Avoid dereferencing end() in collectInterferingVRegs() when there is no
interference. llvm-svn: 122108
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalUnion.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalUnion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalUnion.cpp b/llvm/lib/CodeGen/LiveIntervalUnion.cpp
index 7ebe96f0660..cec68850fa8 100644
--- a/llvm/lib/CodeGen/LiveIntervalUnion.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalUnion.cpp
@@ -238,7 +238,7 @@ collectInterferingVRegs(unsigned MaxInterferingRegs) {
InterferenceResult IR = firstInterference();
LiveInterval::iterator VirtRegEnd = VirtReg->end();
LiveInterval *RecentInterferingVReg = NULL;
- while (IR.LiveUnionI.valid()) {
+ if (IR.VirtRegI != VirtRegEnd) while (IR.LiveUnionI.valid()) {
// Advance the union's iterator to reach an unseen interfering vreg.
do {
if (IR.LiveUnionI.value() == RecentInterferingVReg)
OpenPOWER on IntegriCloud