[all-commits] [llvm/llvm-project] 6f8e8f: [TargetLowering] Fix the problem of emulated-TLS i...

cceerczw via All-commits all-commits at lists.llvm.org
Wed Aug 7 10:57:10 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f8e8faa12daaf4dfd80039ccdeccda68e99850b
      https://github.com/llvm/llvm-project/commit/6f8e8faa12daaf4dfd80039ccdeccda68e99850b
  Author: cceerczw <chengzhiwei6 at huawei.com>
  Date:   2024-08-07 (Wed, 07 Aug 2024)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    A llvm/test/CodeGen/AArch64/emutls_alias.ll

  Log Message:
  -----------
  [TargetLowering] Fix the problem of emulated-TLS implementation witho… (#101490)

For a __thread variable x, when emulated TLS is enabled and there is an
access to x, the compiler first looks up the symbol __emutls_v.x within
the module. However, the issue arises with an alias y of x, the compiler
still tries to look up __emutls_v.y instead of __emutls_v.x. As a
result, the lookup returns a nullptr, causing the compiler to crash. The
purpose of this MR (Merge Request) is to ensure that in emulated TLS,
before checking __emutls_v.y, the compiler first identifies which global
value y is an alias of.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list