DBG_VALUE does not have any side effects; it also makes no sense to mark it cheap as a copy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123031 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/PeepholeOptimizer.cpp b/lib/CodeGen/PeepholeOptimizer.cpp
index 07c2b80..1ddfe8b 100644
--- a/lib/CodeGen/PeepholeOptimizer.cpp
+++ b/lib/CodeGen/PeepholeOptimizer.cpp
@@ -336,7 +336,9 @@
       MachineInstr *MI = &*MII++;
       LocalMIs.insert(MI);
 
-      if (MI->getDesc().hasUnmodeledSideEffects())
+      if (MI->isLabel() || MI->isPHI() || MI->isImplicitDef() ||
+          MI->isKill() || MI->isInlineAsm() || MI->isDebugValue() ||
+          MI->getDesc().hasUnmodeledSideEffects())
         continue;
 
       if (MI->getDesc().isCompare()) {