Skip DEBUG_VALUE in some places where it was affecting codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95647 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp
index a3f6364..71d9b83 100644
--- a/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -318,6 +318,8 @@
MachineInstr *MI = MO.getParent();
if (MI->getParent() != MBB)
continue;
+ if (MI->getOpcode() == TargetInstrInfo::DEBUG_VALUE)
+ continue;
DenseMap<MachineInstr*, unsigned>::iterator DI = DistanceMap.find(MI);
if (DI == DistanceMap.end())
continue;
@@ -341,6 +343,8 @@
MachineInstr *MI = MO.getParent();
if (MI->getParent() != MBB)
continue;
+ if (MI->getOpcode() == TargetInstrInfo::DEBUG_VALUE)
+ continue;
DenseMap<MachineInstr*, unsigned>::iterator DI = DistanceMap.find(MI);
if (DI == DistanceMap.end())
continue;