summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2019-09-03 13:31:22 +0000
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2019-09-03 13:31:22 +0000
commita0a811739dd0464b178e8c7351d6d4eb9e6838c6 (patch)
tree149eff0dc3fc47ece0b4decc762155fb547820cb /llvm/lib/Target
parent600f5c572723d7979a779ea1483a4b1e8b83f465 (diff)
downloadbcm5719-llvm-a0a811739dd0464b178e8c7351d6d4eb9e6838c6.tar.gz
bcm5719-llvm-a0a811739dd0464b178e8c7351d6d4eb9e6838c6.zip
[SystemZ] Recognize INLINEASM_BR in backend.
SystemZInstrInfo::analyzeBranch() needs to check for INLINEASM_BR instructions, or it will crash. Review: Ulrich Weigand llvm-svn: 370753
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
index da71759cc3f..24a234481d3 100644
--- a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
@@ -462,8 +462,8 @@ bool SystemZInstrInfo::analyzeBranch(MachineBasicBlock &MBB,
break;
// A terminator that isn't a branch can't easily be handled by this
- // analysis.
- if (!I->isBranch())
+ // analysis. Asm goto is not understood / optimized.
+ if (!I->isBranch() || I->getOpcode() == SystemZ::INLINEASM_BR)
return true;
// Can't handle indirect branches.
OpenPOWER on IntegriCloud