diff options
| author | Ana Pazos <apazos@codeaurora.org> | 2018-03-23 17:53:27 +0000 |
|---|---|---|
| committer | Ana Pazos <apazos@codeaurora.org> | 2018-03-23 17:53:27 +0000 |
| commit | 41573804f278a6ff3bbc43217c6d4b3bb415df73 (patch) | |
| tree | cdb4db63a99c0e9a4ca4658b90b90c2ce4b43b1a /llvm/lib/Target/ARM | |
| parent | 083960d1d1faf544b3f6e993c49d06a532dff339 (diff) | |
| download | bcm5719-llvm-41573804f278a6ff3bbc43217c6d4b3bb415df73.tar.gz bcm5719-llvm-41573804f278a6ff3bbc43217c6d4b3bb415df73.zip | |
[ARM] Fix "Constant pool entry out of range!" in Thumb1 mode
This patch fixes PR36658, "Constant pool entry out of range!" in Thumb1 mode.
In ARMConstantIslands::optimizeThumb2JumpTables() in Thumb1 mode,
adjustBBOffsetsAfter() is not calculating postOffset correctly by
properly accounting for the padding that is required for the constant pool
that immediately follows the jump table branch instruction.
Reviewers: t.p.northover, eli.friedman
Reviewed By: t.p.northover
Subscribers: chrib, tstellar, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D44709
llvm-svn: 328341
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMComputeBlockSize.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMComputeBlockSize.cpp b/llvm/lib/Target/ARM/ARMComputeBlockSize.cpp index 2e97b99b05a..b263e9d86c4 100644 --- a/llvm/lib/Target/ARM/ARMComputeBlockSize.cpp +++ b/llvm/lib/Target/ARM/ARMComputeBlockSize.cpp @@ -35,6 +35,7 @@ mayOptimizeThumb2Instruction(const MachineInstr *MI) { case ARM::tBcc: // optimizeThumb2JumpTables. case ARM::t2BR_JT: + case ARM::tBR_JTr: return true; } return false; |

