Skip DEBUG_VALUE in some places where it was affecting codegen.
llvm-svn: 95647
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
index a3f6364..71d9b83 100644
--- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/llvm/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;