[all-commits] [llvm/llvm-project] c43282: [RelLookupTableConverter] Drop unnamed_addr for GV...

dianqk via All-commits all-commits at lists.llvm.org
Fri Jun 27 15:43:04 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c43282ab69d7ff1b64f8ef5c84eab46e57553075
      https://github.com/llvm/llvm-project/commit/c43282ab69d7ff1b64f8ef5c84eab46e57553075
  Author: dianqk <dianqk at dianqk.net>
  Date:   2025-06-28 (Sat, 28 Jun 2025)

  Changed paths:
    M llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp
    M llvm/test/Transforms/RelLookupTableConverter/unnamed_addr.ll

  Log Message:
  -----------
  [RelLookupTableConverter] Drop unnamed_addr for GVs in entries to avoid generating GOTPCREL relocations (#146068)

The entry in a relative lookup table is a global variable with a
constant offset, such as `@gv`, `GEP @gv, 1`, and so on.

We cannot only consider the case of a trivial global variable. This PR
handles all cases using the existing `IsConstantOffsetFromGlobal`
function.



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