diff options
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 9 | ||||
-rw-r--r-- | test/CodeGen/X86/coalescer-cross.ll | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index dce05d3e3f..0d137ebba2 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -1543,13 +1543,8 @@ bool MachineInstr::addRegisterDead(unsigned IncomingReg, continue; if (Reg == IncomingReg) { - if (!Found) { - if (MO.isDead()) - // The register is already marked dead. - return true; - MO.setIsDead(); - Found = true; - } + MO.setIsDead(); + Found = true; } else if (hasAliases && MO.isDead() && TargetRegisterInfo::isPhysicalRegister(Reg)) { // There exists a super-register that's marked dead. diff --git a/test/CodeGen/X86/coalescer-cross.ll b/test/CodeGen/X86/coalescer-cross.ll index 7d6f399930..976db6479e 100644 --- a/test/CodeGen/X86/coalescer-cross.ll +++ b/test/CodeGen/X86/coalescer-cross.ll @@ -1,6 +1,10 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin10 | not grep movaps +; RUN: llc < %s -mtriple=i386-apple-darwin10 | FileCheck %s +; RUN: llc < %s -mtriple=i386-apple-darwin10 -regalloc=basic | FileCheck %s ; rdar://6509240 +; CHECK: os_clock +; CHECK-NOT: movaps + type { %struct.TValue } ; type %0 type { %struct.L_Umaxalign, i32, %struct.Node* } ; type %1 %struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.TValue*, i32*, i32, i32 } |