<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] Generate stp for complex repeating constansts"
href="https://bugs.llvm.org/show_bug.cgi?id=52141">52141</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[AArch64] Generate stp for complex repeating constansts
</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>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Keywords</th>
<td>beginner
</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>pavel.iliin@arm.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>For complex repeating constants like:
void
foo (unsigned long long *a)
{
a[0] = 0x0140c0da0140c0daULL;
}
aarch64 clang generates
foo(unsigned long long*): // @foo(unsigned long
long*)
mov x8, #49370
movk x8, #320, lsl #16
movk x8, #49370, lsl #32
movk x8, #320, lsl #48
str x8, [x0]
ret
but for constants where the top half is the same as the bottom half we can
construct just one half and use a store pair to duplicate it:
foo(unsigned long long*):
mov w1, 49370
movk w1, 0x140, lsl 16
stp w1, w1, [x0]
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>