OSDN Git Service

[AArch64] Return the correct size for TLSDESC_CALLSEQ
authorDiana Picus <diana.picus@linaro.org>
Mon, 1 Aug 2016 08:38:49 +0000 (08:38 +0000)
committerDiana Picus <diana.picus@linaro.org>
Mon, 1 Aug 2016 08:38:49 +0000 (08:38 +0000)
commitdeeb6ba1ab5f54c1572b02e5a6a638ba14ebc095
tree20d66ab864d7c33b5c0d869edaa3a95ef8715311
parenta2cd077470e17bcf40b55b64b6b1cfdc08f442c9
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277331 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstrInfo.cpp
test/CodeGen/MIR/AArch64/inst-size-tlsdesc-callseq.mir [new file with mode: 0644]