[llvm-commits] [llvm] r103233 - in /llvm/trunk: lib/CodeGen/RegAllocLocal.cpp test/CodeGen/X86/2010-05-05-LocalAllocEarlyClobber.ll test/CodeGen/X86/2010-05-06-LocalInlineAsmClobber.ll

Nick Lewycky nicholas at mxc.ca
Thu May 6 18:45:38 PDT 2010


Author: nicholas
Date: Thu May  6 20:45:38 2010
New Revision: 103233

URL: http://llvm.org/viewvc/llvm-project?rev=103233&view=rev
Log:
Revert r103133 and add testcase from PR7066.

Added:
    llvm/trunk/test/CodeGen/X86/2010-05-06-LocalInlineAsmClobber.ll
Modified:
    llvm/trunk/lib/CodeGen/RegAllocLocal.cpp
    llvm/trunk/test/CodeGen/X86/2010-05-05-LocalAllocEarlyClobber.ll

Modified: llvm/trunk/lib/CodeGen/RegAllocLocal.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLocal.cpp?rev=103233&r1=103232&r2=103233&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocLocal.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocLocal.cpp Thu May  6 20:45:38 2010
@@ -843,18 +843,8 @@
     SmallVector<unsigned, 8> Kills;
     for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
       MachineOperand &MO = MI->getOperand(i);
-      if (!MO.isReg()) continue;
-      unsigned Reg = MO.getReg();
-      if (!Reg) continue;
-
-      // Avoid allocating assigned early clobbers below.
-      if (MO.isEarlyClobber() && TargetRegisterInfo::isPhysicalRegister(Reg)) {
-        spillPhysReg(MBB, MI, Reg, true); // Spill any existing value in reg
-        PhysRegsUsed[Reg] = 0;            // It is free and reserved now
-        AddToPhysRegsUseOrder(Reg);
-      }
-
-      if (!MO.isKill()) continue;
+      if (!MO.isReg() || !MO.isKill()) continue;
+      
       if (!MO.isImplicit())
         Kills.push_back(MO.getReg());
       else if (!isReadModWriteImplicitKill(MI, MO.getReg()))

Modified: llvm/trunk/test/CodeGen/X86/2010-05-05-LocalAllocEarlyClobber.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-05-05-LocalAllocEarlyClobber.ll?rev=103233&r1=103232&r2=103233&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2010-05-05-LocalAllocEarlyClobber.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2010-05-05-LocalAllocEarlyClobber.ll Thu May  6 20:45:38 2010
@@ -1,5 +1,7 @@
 ; RUN: llc < %s -O0 -regalloc=local | FileCheck %s
 ; PR6520
+; XFAIL: *
+
 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-f80:128:128-n8:16:32"
 target triple = "i386-apple-darwin10.0.0"
 

Added: llvm/trunk/test/CodeGen/X86/2010-05-06-LocalInlineAsmClobber.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-05-06-LocalInlineAsmClobber.ll?rev=103233&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2010-05-06-LocalInlineAsmClobber.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2010-05-06-LocalInlineAsmClobber.ll Thu May  6 20:45:38 2010
@@ -0,0 +1,10 @@
+; RUN: llc -regalloc=local %s -o /dev/null
+; PR7066
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+target triple = "x86_64-unknown-linux-gnu"
+
+define i32 @sys_clone(i32 (i8*)* %fn, i8* %child_stack, i32 %flags, i8* %arg, i32* %parent_tidptr, i8* %newtls, i32* %child_tidptr) nounwind {
+  call i64 asm sideeffect "", "={ax},0,i,i,r,{si},{di},r,{dx},imr,imr,~{sp},~{memory},~{r8},~{r10},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i64 4294967274, i32 56, i32 60, i32 (i8*)* undef, i8* undef, i32 undef, i8* undef, i32* undef, i8* undef, i32* undef) nounwind ; <i64> [#uses=0]
+  ret i32 undef
+}





More information about the llvm-commits mailing list