<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 - mov + mul + dup instructions are used for memset instead of just dup"
href="https://bugs.llvm.org/show_bug.cgi?id=50985">50985</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>mov + mul + dup instructions are used for memset instead of just dup
</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>Linux
</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>kutdanila@yandex.ru
</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><a href="https://gcc.godbolt.org/z/GfYWG5xer">https://gcc.godbolt.org/z/GfYWG5xer</a>
#include <cstring>
void StdMemset(char* a, int b) {
memset(a, b, 64);
}
StdMemset(char*, int): // @StdMemset(char*, int)
and x8, x1, #0xff
mov x9, #72340172838076673
mul x8, x8, x9
dup v0.2d, x8
stp q0, q0, [x0, #32]
stp q0, q0, [x0]
ret
Ideally it should be
StdMemset(char*, int)
dup v0.16b, w1
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
ret</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>