<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 - Missed SLP vectorization with AND op with constant"
href="https://bugs.llvm.org/show_bug.cgi?id=49934">49934</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Missed SLP vectorization with AND op with constant
</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>david.bolvansky@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>void baz( uint8_t *__restrict dst, uint8_t *__restrict src)
{
for( int x = 0; x < 8; x++ ){
dst[x] = src[x]&(~63);
}
}
LLVM -O3
baz(unsigned char*, unsigned char*): #
@baz(unsigned char*, unsigned char*)
mov al, byte ptr [rsi]
and al, -64
mov byte ptr [rdi], al
mov al, byte ptr [rsi + 1]
and al, -64
mov byte ptr [rdi + 1], al
mov al, byte ptr [rsi + 2]
and al, -64
mov byte ptr [rdi + 2], al
mov al, byte ptr [rsi + 3]
and al, -64
mov byte ptr [rdi + 3], al
mov al, byte ptr [rsi + 4]
and al, -64
mov byte ptr [rdi + 4], al
mov al, byte ptr [rsi + 5]
and al, -64
mov byte ptr [rdi + 5], al
mov al, byte ptr [rsi + 6]
and al, -64
mov byte ptr [rdi + 6], al
mov al, byte ptr [rsi + 7]
and al, -64
mov byte ptr [rdi + 7], al
ret
ICC/GCC:
baz(unsigned char*, unsigned char*):
vmovq xmm0, QWORD PTR [rsi]
vmovq xmm1, QWORD PTR .LC0[rip]
vpand xmm0, xmm0, xmm1
vmovq QWORD PTR [rdi], xmm0
ret
<a href="https://godbolt.org/z/on8TanTa8">https://godbolt.org/z/on8TanTa8</a></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>