[PATCH] D72878: [X86][BranchAlign] Suppress branch alignment for {,_}__tls_get_addr
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 18:15:26 PST 2020
skan added inline comments.
================
Comment at: llvm/test/CodeGen/X86/align-branch-boundary-suppressions-tls.ll:21
+; CHECK: #noautopadding
+; 32: leal ld at TLSLDM(%ebx), %eax
+; 32: calll ___tls_get_addr at PLT
----------------
MaskRay wrote:
> LuoYuanke wrote:
> > Obviously disable auto padding for TLS is safety, but I am curious what's the problem if we don't disable it? In our previous patch, we check if there is any variant symbol in needAlignInst(...).
> This only affects x86-64 General Dynamic TLS model, which emits some prefixes.
>
> ```
> (DATA16_PREFIX)
> (LEA64r)
> <--- Diff 21 can place cs (0x2e) here and break the General Dynamic TLS code sequence --->
> <MCInst 851> (DATA16_PREFIX)
> <MCInst 851> (DATA16_PREFIX)
> <MCInst 2450> (REX64_PREFIX)
> <MCInst 602 <MCOperand Expr:(__tls_get_addr at PLT)>> CALL64pcrel32
> ```
>
> D72225 can prepend another prefix and cause a failure.
Could you provide a assemble file to help us reproduce the fail? That will be more helpful.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72878/new/
https://reviews.llvm.org/D72878
More information about the llvm-commits
mailing list