[llvm] r322688 - [SystemZ] Handle BRCTH branches correctly in SystemZLongBranch.cpp.
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 09:16:07 PST 2018
Author: jonpa
Date: Wed Jan 17 09:16:07 2018
New Revision: 322688
URL: http://llvm.org/viewvc/llvm-project?rev=322688&view=rev
Log:
[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
Added:
llvm/trunk/test/CodeGen/SystemZ/branch-12.ll
Modified:
llvm/trunk/lib/Target/SystemZ/SystemZLongBranch.cpp
Modified: llvm/trunk/lib/Target/SystemZ/SystemZLongBranch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZLongBranch.cpp?rev=322688&r1=322687&r2=322688&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZLongBranch.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZLongBranch.cpp Wed Jan 17 09:16:07 2018
@@ -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];
More information about the llvm-commits
mailing list