diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-01-14 15:05:27 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-01-14 15:05:27 +0000 |
commit | b28ae10a163e4be5ef4553987d6e0104b7f806bf (patch) | |
tree | 036e2775529464bee3974f711ae3312b66ab1b55 /llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp | |
parent | 31f3ddd589367a4dff747983758b4b81cdc44634 (diff) | |
download | bcm5719-llvm-b28ae10a163e4be5ef4553987d6e0104b7f806bf.tar.gz bcm5719-llvm-b28ae10a163e4be5ef4553987d6e0104b7f806bf.zip |
[Hexagon] Handle branches with non-mbb operands
llvm-svn: 257768
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp index eb3590cb107..c3cf05541aa 100644 --- a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp +++ b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp @@ -377,6 +377,9 @@ bool HexagonInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, bool LastOpcodeHasJMP_c = PredOpcodeHasJMP_c(LastOpcode); bool LastOpcodeHasNVJump = isNewValueJump(LastInst); + if (LastOpcodeHasJMP_c && !LastInst->getOperand(1).isMBB()) + return true; + // If there is only one terminator instruction, process it. if (LastInst && !SecondLastInst) { if (LastOpcode == Hexagon::J2_jump) { @@ -412,6 +415,8 @@ bool HexagonInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, bool SecLastOpcodeHasJMP_c = PredOpcodeHasJMP_c(SecLastOpcode); bool SecLastOpcodeHasNVJump = isNewValueJump(SecondLastInst); if (SecLastOpcodeHasJMP_c && (LastOpcode == Hexagon::J2_jump)) { + if (!SecondLastInst->getOperand(1).isMBB()) + return true; TBB = SecondLastInst->getOperand(1).getMBB(); Cond.push_back(MachineOperand::CreateImm(SecondLastInst->getOpcode())); Cond.push_back(SecondLastInst->getOperand(0)); |