summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit0dcd3362bd809065be1b3d5d2b45ef6117c4ad9e (patch)
tree5038d11856c9e181294151289c6c24c4ba2246c2 /llvm/lib/CodeGen/MachineCSE.cpp
parent4a253e5ac8aae0820da282b869871b54d57f6c38 (diff)
downloadbcm5719-llvm-0dcd3362bd809065be1b3d5d2b45ef6117c4ad9e.tar.gz
bcm5719-llvm-0dcd3362bd809065be1b3d5d2b45ef6117c4ad9e.zip
Fix a potential bug that can cause miscomparison with and without debug info.
llvm-svn: 114220
Diffstat (limited to 'llvm/lib/CodeGen/MachineCSE.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCSE.cpp2
1 files changed, 1 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud