aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LiveInterval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/LiveInterval.cpp')
-rw-r--r--lib/CodeGen/LiveInterval.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp
index 0428105..c8d3d43 100644
--- a/lib/CodeGen/LiveInterval.cpp
+++ b/lib/CodeGen/LiveInterval.cpp
@@ -800,15 +800,15 @@ void LiveInterval::ComputeJoinedWeight(const LiveInterval &Other) {
// weight of the non-spilled interval. This can only happen with
// iterative coalescers.
- if (weight == HUGE_VALF &&
+ if (Other.weight != HUGE_VALF) {
+ weight += Other.weight;
+ }
+ else if (weight == HUGE_VALF &&
!TargetRegisterInfo::isPhysicalRegister(reg)) {
// Remove this assert if you have an iterative coalescer
assert(0 && "Joining to spilled interval");
weight = Other.weight;
}
- else if (Other.weight != HUGE_VALF) {
- weight += Other.weight;
- }
else {
// Otherwise the weight stays the same
// Remove this assert if you have an iterative coalescer