From 0638c20e7c6a084e454368c072f4bbe44c571479 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 7 Jan 2011 21:08:26 +0000 Subject: DBG_VALUE does not have any side effects; it also makes no sense to mark it cheap as a copy. llvm-svn: 123031 --- llvm/lib/CodeGen/MachineInstr.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MachineInstr.cpp') diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index bc2a545a5f2..ccb2ffbab1d 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1115,7 +1115,9 @@ bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII, SawStore = true; return false; } - if (TID->isTerminator() || TID->hasUnmodeledSideEffects()) + + if (isLabel() || isDebugValue() || + TID->isTerminator() || TID->hasUnmodeledSideEffects()) return false; // See if this instruction does a load. If so, we have to guarantee that the -- cgit v1.2.3