<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 --- - [AArch64] Combine loads of v4i8 to load of i32"
href="https://llvm.org/bugs/show_bug.cgi?id=27815">27815</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[AArch64] Combine loads of v4i8 to load of i32
</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>normal
</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>junbuml@codeaurora.org
</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>This is based on <a href="http://reviews.llvm.org/D20443">http://reviews.llvm.org/D20443</a>.
In summary, for the test below,
define <16 x i8> @test(i32* %s, i32* %t) {
entry:
%0 = bitcast i32* %s to <4 x i8>*
%1 = load <4 x i8>, <4 x i8>* %0, align 4
%2 = shufflevector <4 x i8> %1, <4 x i8> undef, <16 x i32> <i32 0, i32 1, i32
2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1,
i32 2, i32 3>
ret <16 x i8> %2
}
AArch64 backend generates very inefficient code :
ldrb w8, [x0]
ldrb w9, [x0, #1]
ldrb w10, [x0, #2]
ldrb w11, [x0, #3]
ins v1.h[0], w8
ins v1.h[1], w9
ins v1.h[2], w10
ins v1.h[3], w11
umov w8, v1.h[0]
umov w9, v1.h[1]
ins v0.b[0], w8
umov w10, v1.h[2]
ins v0.b[1], w9
ins v0.b[2], w10
umov w11, v1.h[3]
ins v0.b[3], w11
ins v0.b[4], w8
ins v0.b[5], w9
ins v0.b[6], w10
ins v0.b[7], w11
ins v0.b[8], w8
ins v0.b[9], w9
ins v0.b[10], w10
ins v0.b[11], w11
ins v0.b[12], w8
ins v0.b[13], w9
ins v0.b[14], w10
ins v0.b[15], w11
re
Like D20443, we can generate just like :
ld1r { v0.4s }, [x0]</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>