diff options
| author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-07-30 09:59:33 +0000 |
|---|---|---|
| committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-07-30 09:59:33 +0000 |
| commit | 7d003657de25501d444e2c142e3a499252b441cb (patch) | |
| tree | 909e996a4e310a8afc05074ebcab2b47d4877ccf /llvm/lib/Target | |
| parent | 927b3da6c9501617d65ca4adf5bcb60c5a8f8398 (diff) | |
| download | bcm5719-llvm-7d003657de25501d444e2c142e3a499252b441cb.tar.gz bcm5719-llvm-7d003657de25501d444e2c142e3a499252b441cb.zip | |
[MachineOutliner][X86] Use TAILJMPd64 instead of JMP_1 for TailCall construction
The machine verifier asserts with:
Assertion failed: (isMBB() && "Wrong MachineOperand accessor"), function getMBB, file ../include/llvm/CodeGen/MachineOperand.h, line 542.
It calls analyzeBranch which tries to call getMBB if the opcode is
JMP_1, but in this case we do:
JMP_1 @OUTLINED_FUNCTION
I believe we have to use TAILJMPd64 instead of JMP_1 since JMP_1 is used
with brtarget8.
Differential Revision: https://reviews.llvm.org/D49299
llvm-svn: 338237
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 1b61accfb42..96db8b4e758 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -7725,7 +7725,7 @@ X86InstrInfo::insertOutlinedCall(Module &M, MachineBasicBlock &MBB, if (C.CallConstructionID == MachineOutlinerTailCall) { // Yes, just insert a JMP. It = MBB.insert(It, - BuildMI(MF, DebugLoc(), get(X86::JMP_1)) + BuildMI(MF, DebugLoc(), get(X86::TAILJMPd64)) .addGlobalAddress(M.getNamedValue(MF.getName()))); } else { // No, insert a call. |

