<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - Optimize vadd_s64(vget_low_s64(x), vget_high_s64(x)) as vaddvq_s64(x)"
href="https://llvm.org/bugs/show_bug.cgi?id=25612">25612</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Optimize vadd_s64(vget_low_s64(x), vget_high_s64(x)) as vaddvq_s64(x)
</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>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>lennox@cs.columbia.edu
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=15338" name="attach_15338" title="Test code with sample functions and test they are identical">attachment 15338</a> <a href="attachment.cgi?id=15338&action=edit" title="Test code with sample functions and test they are identical">[details]</a></span>
Test code with sample functions and test they are identical
On Aarch64, clang/LLVM misses an optimization for vadd_s64(vget_low_s64(x),
vget_high_s64(x)). It can be emitted as addp.2d, in the same way as
vaddvq_s64.
The reason someone would write the former rather than the latter is that the
former is also valid armv7 Neon intrinsic code, whereas the latter is
aarch64-only. (This arose in actual code, Neon optimizations for the Opus
audio codec.)
See attached test code. The two test functions optimize as:
func1:
ext v1.16b, v0.16b, v0.16b, #8
add d0, d0, d1
fmov x0, d0
ret
func2:
addp d0, v0.2d
fmov x0, d0
ret
even though they have identical behavior.</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>