summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetInstrInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-07-06 23:22:03 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-07-06 23:22:03 +0000
commitd771e05121e04db3c648f334222515e73004a825 (patch)
tree3e3463578fa6df172ccd323d10f8c84ad3eaee47 /llvm/lib/Target/TargetInstrInfo.cpp
parentb039c6088926652ea82b34d61a250ed8a5bff144 (diff)
downloadbcm5719-llvm-d771e05121e04db3c648f334222515e73004a825.tar.gz
bcm5719-llvm-d771e05121e04db3c648f334222515e73004a825.zip
isUnpredicatedTerminator should treat conditional branches as unpredicated terminator.
llvm-svn: 37960
Diffstat (limited to 'llvm/lib/Target/TargetInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/TargetInstrInfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetInstrInfo.cpp b/llvm/lib/Target/TargetInstrInfo.cpp
index 9e706cdcfe6..11b5b635db4 100644
--- a/llvm/lib/Target/TargetInstrInfo.cpp
+++ b/llvm/lib/Target/TargetInstrInfo.cpp
@@ -88,9 +88,12 @@ bool TargetInstrInfo::PredicateInstruction(MachineInstr *MI,
bool TargetInstrInfo::isUnpredicatedTerminator(const MachineInstr *MI) const {
const TargetInstrDescriptor *TID = MI->getInstrDescriptor();
if (TID->Flags & M_TERMINATOR_FLAG) {
+ // Conditional branch is a special case.
+ if ((TID->Flags & M_BRANCH_FLAG) != 0 && (TID->Flags & M_BARRIER_FLAG) == 0)
+ return true;
if ((TID->Flags & M_PREDICABLE) == 0)
return true;
return !isPredicated(MI);
-}
+ }
return false;
}
OpenPOWER on IntegriCloud