<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 - [X86] znver missing cmpxchg8b feature, resulting in expanded atomicrmw"
href="https://bugs.llvm.org/show_bug.cgi?id=42935">42935</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[X86] znver missing cmpxchg8b feature, resulting in expanded atomicrmw
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>9.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: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nikita.ppv@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>define i64 @test(i64* %p) {
%x = atomicrmw sub i64* %p, i64 1 seq_cst
ret i64 %x
}
Under -mcpu=znver1 results in:
pushq %rax
.cfi_def_cfa_offset 16
movl $1, %esi
movl $5, %edx
callq __atomic_fetch_sub_8
popq %rcx
.cfi_def_cfa_offset 8
retq
While it should produce a "lock xaddq" instruction.
This issue was introduced in <a href="https://reviews.llvm.org/D59576">https://reviews.llvm.org/D59576</a>, where the
CMPXCHG8B feature flag was not added to ZNFeatures.</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>