[llvm-commits] [llvm] r95938 - in /llvm/trunk: lib/CodeGen/SimpleRegisterCoalescing.cpp test/CodeGen/Thumb2/cross-rc-coalescing-2.ll test/CodeGen/X86/2008-07-11-SpillerBug.ll test/CodeGen/X86/pr1505b.ll test/CodeGen/X86/pr3495.ll test/CodeGen/X86/stack-color-with-reg.ll test/CodeGen/X86/twoaddr-coalesce.ll

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Feb 11 15:55:29 PST 2010


Author: stoklund
Date: Thu Feb 11 17:55:29 2010
New Revision: 95938

URL: http://llvm.org/viewvc/llvm-project?rev=95938&view=rev
Log:
Reapply coalescer fix for better cross-class coalescing.

This time with fixed test cases.

Modified:
    llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
    llvm/trunk/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll
    llvm/trunk/test/CodeGen/X86/2008-07-11-SpillerBug.ll
    llvm/trunk/test/CodeGen/X86/pr1505b.ll
    llvm/trunk/test/CodeGen/X86/pr3495.ll
    llvm/trunk/test/CodeGen/X86/stack-color-with-reg.ll
    llvm/trunk/test/CodeGen/X86/twoaddr-coalesce.ll

Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=95938&r1=95937&r2=95938&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Thu Feb 11 17:55:29 2010
@@ -1148,7 +1148,7 @@
   LiveInterval &SmallInt = li_->getInterval(SmallReg);
   unsigned LargeSize = li_->getApproximateInstructionCount(LargeInt);
   unsigned SmallSize = li_->getApproximateInstructionCount(SmallInt);
-  if (SmallSize > Threshold || LargeSize > Threshold) {
+  if (LargeSize > Threshold) {
     unsigned SmallUses = std::distance(mri_->use_nodbg_begin(SmallReg),
                                        mri_->use_nodbg_end());
     unsigned LargeUses = std::distance(mri_->use_nodbg_begin(LargeReg),

Modified: llvm/trunk/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll?rev=95938&r1=95937&r2=95938&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll (original)
+++ llvm/trunk/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll Thu Feb 11 17:55:29 2010
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 | grep vmov.f32 | count 7
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 | grep vmov.f32 | count 3
 
 define arm_apcscc void @fht(float* nocapture %fz, i16 signext %n) nounwind {
 entry:

Modified: llvm/trunk/test/CodeGen/X86/2008-07-11-SpillerBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-07-11-SpillerBug.ll?rev=95938&r1=95937&r2=95938&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-07-11-SpillerBug.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-07-11-SpillerBug.ll Thu Feb 11 17:55:29 2010
@@ -1,9 +1,7 @@
 ; RUN: llc < %s -march=x86 -relocation-model=static -disable-fp-elim -post-RA-scheduler=false -asm-verbose=0 | FileCheck %s
 ; PR2536
 
-
-; CHECK: movw %cx
-; CHECK-NEXT: andl    $65534, %
+; CHECK: andl    $65534, %
 ; CHECK-NEXT: movl %
 ; CHECK-NEXT: movl $17
 

Modified: llvm/trunk/test/CodeGen/X86/pr1505b.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr1505b.ll?rev=95938&r1=95937&r2=95938&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/X86/pr1505b.ll (original)
+++ llvm/trunk/test/CodeGen/X86/pr1505b.ll Thu Feb 11 17:55:29 2010
@@ -1,5 +1,5 @@
-; RUN: llc < %s -mcpu=i486 | grep fstpl | count 4
-; RUN: llc < %s -mcpu=i486 | grep fstps | count 3
+; RUN: llc < %s -mcpu=i486 | grep fstpl | count 5
+; RUN: llc < %s -mcpu=i486 | grep fstps | count 2
 ; PR1505
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"

Modified: llvm/trunk/test/CodeGen/X86/pr3495.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr3495.ll?rev=95938&r1=95937&r2=95938&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/X86/pr3495.ll (original)
+++ llvm/trunk/test/CodeGen/X86/pr3495.ll Thu Feb 11 17:55:29 2010
@@ -1,6 +1,6 @@
 ; RUN: llc < %s -march=x86 -stats |& grep {Number of loads added} | grep 2
 ; RUN: llc < %s -march=x86 -stats |& grep {Number of register spills} | grep 1
-; RUN: llc < %s -march=x86 -stats |& grep {Number of machine instrs printed} | grep 38
+; RUN: llc < %s -march=x86 -stats |& grep {Number of machine instrs printed} | grep 37
 ; PR3495
 ; The loop reversal kicks in once here, resulting in one fewer instruction.
 

Modified: llvm/trunk/test/CodeGen/X86/stack-color-with-reg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stack-color-with-reg.ll?rev=95938&r1=95937&r2=95938&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/X86/stack-color-with-reg.ll (original)
+++ llvm/trunk/test/CodeGen/X86/stack-color-with-reg.ll Thu Feb 11 17:55:29 2010
@@ -1,5 +1,5 @@
 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -relocation-model=pic -disable-fp-elim -color-ss-with-regs -stats -info-output-file - > %t
-; RUN:   grep stackcoloring %t | grep "stack slot refs replaced with reg refs"  | grep 14
+; RUN:   grep stackcoloring %t | grep "stack slot refs replaced with reg refs"  | grep 8
 
 	type { [62 x %struct.Bitvec*] }		; type %0
 	type { i8* }		; type %1

Modified: llvm/trunk/test/CodeGen/X86/twoaddr-coalesce.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/twoaddr-coalesce.ll?rev=95938&r1=95937&r2=95938&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/X86/twoaddr-coalesce.ll (original)
+++ llvm/trunk/test/CodeGen/X86/twoaddr-coalesce.ll Thu Feb 11 17:55:29 2010
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 | grep mov | count 5
+; RUN: llc < %s -march=x86 | grep mov | count 4
 ; rdar://6523745
 
 @"\01LC" = internal constant [4 x i8] c"%d\0A\00"		; <[4 x i8]*> [#uses=1]





More information about the llvm-commits mailing list