<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 - [SLPVectorizer] Failure to utilize load gather operations"
href="https://bugs.llvm.org/show_bug.cgi?id=47629">47629</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[SLPVectorizer] Failure to utilize load gather operations
</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>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dtemirbulatov@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>For the following code:
void add0(int * __restrict dst, const int * __restrict src) {
*dst++ = *src++ + 1;
*dst++ = *(src+10) + 2;
*dst++ = *(src+3) + 3;
*dst++ = *src++ + 4;
}
the SLP produces this output:
define dso_local void @add0(i32* noalias nocapture %dst, i32* noalias nocapture
readonly %src) local_unnamed_addr #0 {
entry:
%incdec.ptr = getelementptr inbounds i32, i32* %src, i64 1
%0 = load i32, i32* %src, align 4, !tbaa !2
%add.ptr = getelementptr inbounds i32, i32* %src, i64 11
%1 = load i32, i32* %add.ptr, align 4, !tbaa !2
%add.ptr4 = getelementptr inbounds i32, i32* %src, i64 4
%2 = load i32, i32* %add.ptr4, align 4, !tbaa !2
%3 = load i32, i32* %incdec.ptr, align 4, !tbaa !2
%4 = insertelement <4 x i32> undef, i32 %0, i32 0
%5 = insertelement <4 x i32> %4, i32 %1, i32 1
%6 = insertelement <4 x i32> %5, i32 %2, i32 2
%7 = insertelement <4 x i32> %6, i32 %3, i32 3
%8 = add nsw <4 x i32> %7, <i32 1, i32 2, i32 3, i32 4>
%9 = bitcast i32* %dst to <4 x i32>*
store <4 x i32> %8, <4 x i32>* %9, align 4, !tbaa !2
ret void
}
but it could utilize llvm.masked.gather for avx2 and higher capable targets</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>