summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-01-07 21:08:26 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-01-07 21:08:26 +0000
commit30a343aeedf777f9b8b6be9823da750afbf765b1 (patch)
treee6b405c527a518555d2cb424546fa4ddeae4f84f /lib/CodeGen/MachineInstr.cpp
parenteaff66a8950bb9ed76e830c4ded7e0b695ab6904 (diff)
downloadllvm-30a343aeedf777f9b8b6be9823da750afbf765b1.tar.gz
llvm-30a343aeedf777f9b8b6be9823da750afbf765b1.tar.bz2
llvm-30a343aeedf777f9b8b6be9823da750afbf765b1.tar.xz
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
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index bc2a545a5f..ccb2ffbab1 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/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