<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 - Link register not saved across Statepoint call sites"
href="https://bugs.llvm.org/show_bug.cgi?id=50553">50553</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Link register not saved across Statepoint call sites
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>12.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: AArch64
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>david.lloyd@redhat.com
</td>
</tr>
<tr>
<th>CC</th>
<td>arnaud.degrandmaison@arm.com, llvm-bugs@lists.llvm.org, smithp352@googlemail.com, Ties.Stuij@arm.com
</td>
</tr></table>
<p>
<div>
<pre>On Aarch64, it seems that the link register isn't saved across statepoint call
sites, causing general havoc.
The workaround appears to be to forcibly enable frame pointers for non-leaf
functions, but there may be other register issues that are not as obvious.
Using `llc -march=aarch64`, it can be shown with a simple program that the
branch does not preserve the link register. Here's the example on godbolt:
<a href="https://godbolt.org/z/a7oYva4Eb">https://godbolt.org/z/a7oYva4Eb</a>
As can be seen, forcing the frame pointer to be used fixes the issue.</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>