diff options
| author | Diana Picus <diana.picus@linaro.org> | 2016-08-01 08:38:49 +0000 |
|---|---|---|
| committer | Diana Picus <diana.picus@linaro.org> | 2016-08-01 08:38:49 +0000 |
| commit | ab5a4c7dbb0a16ea9bc4bfc5d5bdd67798e87958 (patch) | |
| tree | 63dd4164fa1de2819eeb8744261c83e1b8dec971 /llvm/lib | |
| parent | d2b2d745ff130cd41778f07eb42cf973bfb484f3 (diff) | |
| download | bcm5719-llvm-ab5a4c7dbb0a16ea9bc4bfc5d5bdd67798e87958.tar.gz bcm5719-llvm-ab5a4c7dbb0a16ea9bc4bfc5d5bdd67798e87958.zip | |
[AArch64] Return the correct size for TLSDESC_CALLSEQ
The branch relaxation pass is computing the wrong offsets because it assumes
TLSDESC_CALLSEQ eats up 4 bytes, when in fact it is lowered to an instruction
sequence taking up 16 bytes. This can become a problem in huge files with lots
of TLS accesses, as it may slowly move branch targets out of the range computed
by the branch relaxation pass.
Fixes PR24234 https://llvm.org/bugs/show_bug.cgi?id=24234
Differential Revision: https://reviews.llvm.org/D22870
llvm-svn: 277331
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index e512cb89dac..319ee3b495c 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -56,6 +56,9 @@ unsigned AArch64InstrInfo::getInstSizeInBytes(const MachineInstr &MI) const { case TargetOpcode::IMPLICIT_DEF: case TargetOpcode::KILL: return 0; + case AArch64::TLSDESC_CALLSEQ: + // This gets lowered to an instruction sequence which takes 16 bytes + return 16; } llvm_unreachable("getInstSizeInBytes()- Unable to determin insn size"); |

