[llvm-commits] [llvm] r114220 - /llvm/trunk/lib/CodeGen/MachineCSE.cpp
Evan Cheng
evan.cheng at apple.com
Fri Sep 17 14:56:26 PDT 2010
Author: evancheng
Date: Fri Sep 17 16:56:26 2010
New Revision: 114220
URL: http://llvm.org/viewvc/llvm-project?rev=114220&view=rev
Log:
Fix a potential bug that can cause miscomparison with and without debug info.
Modified:
llvm/trunk/lib/CodeGen/MachineCSE.cpp
Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=114220&r1=114219&r2=114220&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Fri Sep 17 16:56:26 2010
@@ -101,7 +101,7 @@
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;
More information about the llvm-commits
mailing list