<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 - [AArch64] cmpxchg not using Armv8.1-a instructions at -O0"
href="https://bugs.llvm.org/show_bug.cgi?id=35072">35072</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[AArch64] cmpxchg not using Armv8.1-a instructions at -O0
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>Christof.Douma@arm.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=19337" name="attach_19337" title="reproducer">attachment 19337</a> <a href="attachment.cgi?id=19337&action=edit" title="reproducer">[details]</a></span>
reproducer
The Armv8.1-a target has a compare-and-swap (CAS) instruction which is used to
implement cmpxchg operation of LLVM IR. However, at -O0 the code generator is
still emitting a long code sequence to emulate this instruction.
LLVM should use CAS even at -O0.
A reproducer that show the behaviour is attached. Compile using:
llc -mattr=+v8.1a cmpxchg.ll -O[0|2]</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>