aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-12-23 17:28:50 +0000
committerDan Gohman <gohman@apple.com>2008-12-23 17:28:50 +0000
commit237dee125997dcaf16e391878465162cc680c0fa (patch)
tree19d19ef28ab054c1d6f06bb57aad3587730f3ae5 /lib/CodeGen/MachineInstr.cpp
parente1dfc7da8991270db5094aa736fde273bfab6061 (diff)
Use isTerminator() instead of isBranch()||isReturn() in
several places. isTerminator() returns true for a superset of cases, and includes things like FP_REG_KILL, which are nither return or branch but aren't safe to move/remat/etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 2f026018fa..3825ddbb07 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -707,7 +707,7 @@ bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII,
SawStore = true;
return false;
}
- if (TID->isReturn() || TID->isBranch() || TID->hasUnmodeledSideEffects())
+ if (TID->isTerminator() || TID->hasUnmodeledSideEffects())
return false;
// See if this instruction does a load. If so, we have to guarantee that the