summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2018-01-17 17:16:07 +0000
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2018-01-17 17:16:07 +0000
commitef785694f203be238fa23dd8fa38fcad43ff2f9b (patch)
tree734e14c080219792d70f1d3c284d71887bdf574a /llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
parentae7ff385c696c2246ed29c664dc33f8c4495b02e (diff)
downloadbcm5719-llvm-ef785694f203be238fa23dd8fa38fcad43ff2f9b.tar.gz
bcm5719-llvm-ef785694f203be238fa23dd8fa38fcad43ff2f9b.zip
[SystemZ] Handle BRCTH branches correctly in SystemZLongBranch.cpp.
BRCTH is capable of a long branch which needs to be recognized during branch relaxation. This is done by checking for ExtraRelaxSize == 0. Review: Ulrich Weigand llvm-svn: 322688
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZLongBranch.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZLongBranch.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp b/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
index 791f0334e0f..ef8b9806f89 100644
--- a/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
@@ -312,7 +312,7 @@ uint64_t SystemZLongBranch::initMBBInfo() {
// relaxed if it were placed at address Address.
bool SystemZLongBranch::mustRelaxBranch(const TerminatorInfo &Terminator,
uint64_t Address) {
- if (!Terminator.Branch)
+ if (!Terminator.Branch || Terminator.ExtraRelaxSize == 0)
return false;
const MBBInfo &Target = MBBs[Terminator.TargetBlock];
OpenPOWER on IntegriCloud