<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - GOT references generated for code that requests static relocation model"
   href="https://bugs.llvm.org/show_bug.cgi?id=49693">49693</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>GOT references generated for code that requests static relocation model
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Common Code Generator Code
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>simonas+llvm.org@kazlauskas.me
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>; RUN: llc --relocation-model=static -mtriple=aarch64-none < %s
; RUN: llc --relocation-model=static -mtriple=x86_64-none < %s
define void @peach() unnamed_addr {
start:
  br label %bb1

bb1:                                              ; preds = %bb1, %start
  %0 = load volatile i8, i8* bitcast (void ()* @banana to i8*), align 1
  br label %bb1
}

declare void @banana() unnamed_addr

The following example generates GOT references in LLVM 12, but did not do so in
LLVM 11.

If the `@banana` is marked as `dso_local`, then a local reference is generated,
however my understanding is that the `dso_local` annotation is a hint that the
compiler is allowed to generate direct references and not that its absence
requires it to produce GOT references.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>