From 0dcd3362bd809065be1b3d5d2b45ef6117c4ad9e Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 17 Sep 2010 21:56:26 +0000 Subject: Fix a potential bug that can cause miscomparison with and without debug info. llvm-svn: 114220 --- llvm/lib/CodeGen/MachineCSE.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/MachineCSE.cpp b/llvm/lib/CodeGen/MachineCSE.cpp index 92e2299ec62..39a50d2078f 100644 --- a/llvm/lib/CodeGen/MachineCSE.cpp +++ b/llvm/lib/CodeGen/MachineCSE.cpp @@ -101,7 +101,7 @@ bool MachineCSE::PerformTrivialCoalescing(MachineInstr *MI, unsigned Reg = MO.getReg(); if (!Reg || TargetRegisterInfo::isPhysicalRegister(Reg)) continue; - if (!MRI->hasOneUse(Reg)) + if (!MRI->hasOneNonDBGUse(Reg)) // Only coalesce single use copies. This ensure the copy will be // deleted. continue; -- cgit v1.2.3