summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineCSE.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-09-17 21:56:26 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-09-17 21:56:26 +0000
commitf437f733484169cf67f7c3e798908bbf27175580 (patch)
tree76db2e7d3c9ffcf5ac555bd9e7336f8c07a26d8c /lib/CodeGen/MachineCSE.cpp
parent38cb1cdfb7308e82ed00985427f78d11d817d88a (diff)
downloadllvm-f437f733484169cf67f7c3e798908bbf27175580.tar.gz
llvm-f437f733484169cf67f7c3e798908bbf27175580.tar.bz2
llvm-f437f733484169cf67f7c3e798908bbf27175580.tar.xz
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
Diffstat (limited to 'lib/CodeGen/MachineCSE.cpp')
-rw-r--r--lib/CodeGen/MachineCSE.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineCSE.cpp b/lib/CodeGen/MachineCSE.cpp
index 92e2299ec6..39a50d2078 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;