summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-19 23:59:27 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-19 23:59:27 +0000
commit4e1e43a355d55e376eeecb11d8f4fd6ff3b852fe (patch)
treee840ce29c334eddabef5302194d81eb0db075d8c /llvm
parenta9e9ebcfb5268f2ebab8c46ea9e025e1c0caeddc (diff)
downloadbcm5719-llvm-4e1e43a355d55e376eeecb11d8f4fd6ff3b852fe.tar.gz
bcm5719-llvm-4e1e43a355d55e376eeecb11d8f4fd6ff3b852fe.zip
Simplify overlap check.
llvm-svn: 157137
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index ca5d2807397..7831906c620 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -1397,15 +1397,8 @@ bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) {
while (I != IE && J != JE) {
// Determine if these two live ranges overlap.
- bool Overlaps;
- if (I->start < J->start) {
- Overlaps = I->end > J->start;
- } else {
- Overlaps = J->end > I->start;
- }
-
// If so, check value # info to determine if they are really different.
- if (Overlaps) {
+ if (I->end > J->start && J->end > I->start) {
// If the live range overlap will map to the same value number in the
// result liverange, we can still coalesce them. If not, we can't.
if (LHSValNoAssignments[I->valno->id] !=
OpenPOWER on IntegriCloud