From 9637dd50f46bde79091c86c062b58bf406ac2a25 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Thu, 11 Feb 2010 21:19:44 +0000 Subject: [PATCH] Revert functional change. This broke a bunch of tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95921 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SimpleRegisterCoalescing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index ac19f48e651..df5c0ef3751 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -1148,7 +1148,7 @@ SimpleRegisterCoalescing::isWinToJoinCrossClass(unsigned LargeReg, LiveInterval &SmallInt = li_->getInterval(SmallReg); unsigned LargeSize = li_->getApproximateInstructionCount(LargeInt); unsigned SmallSize = li_->getApproximateInstructionCount(SmallInt); - if (LargeSize > Threshold) { + if (SmallSize > Threshold || LargeSize > Threshold) { unsigned SmallUses = std::distance(mri_->use_nodbg_begin(SmallReg), mri_->use_nodbg_end()); unsigned LargeUses = std::distance(mri_->use_nodbg_begin(LargeReg),