From: Evan Cheng Date: Fri, 17 Sep 2010 21:56:26 +0000 (+0000) Subject: Fix a potential bug that can cause miscomparison with and without debug info. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=f437f733484169cf67f7c3e798908bbf27175580;p=oota-llvm.git Fix a potential bug that can cause miscomparison with and without debug info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114220 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineCSE.cpp b/lib/CodeGen/MachineCSE.cpp index 92e2299ec62..39a50d2078f 100644 --- a/lib/CodeGen/MachineCSE.cpp +++ b/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;