<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 --- - memcpy without llvm.mem.parallel_loop_access metadata in loop annotated with #pragma clang loop vectorize(assume_safety)"
href="https://llvm.org/bugs/show_bug.cgi?id=28980">28980</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>memcpy without llvm.mem.parallel_loop_access metadata in loop annotated with #pragma clang loop vectorize(assume_safety)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dorit.nuzman@intel.com
</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=16949" name="attach_16949" title="Example .cpp and output of clang for that .cpp where memcpy is missing the mem_par metadata">attachment 16949</a> <a href="attachment.cgi?id=16949&action=edit" title="Example .cpp and output of clang for that .cpp where memcpy is missing the mem_par metadata">[details]</a></span>
Example .cpp and output of clang for that .cpp where memcpy is missing the
mem_par metadata
Clang doesn't attach a llvm.mem.parallel_loop_access metadata for memcpy
instructions in a loop that is annotated with
#pragma clang loop vectorize(assume_safety):
Example1:
#pragma clang loop vectorize(assume_safety)
for (long i = 0; i < size; i+=2) {
memcpy(&(out[i]), &(out[i+size]), 2);
}
Example2: Here the struct copies result in a memcpy:
void test(Complex *out, long size)
{
long m = size / 2;
#pragma clang loop vectorize(assume_safety)
for (long offset = 0; offset < m; ++offset) {
Complex t0 = out[offset];
Complex t1 = out[offset+m];
out[offset] = t0 + t1;
out[offset+m] = t0 - t1;
}
}
.c and .ll created by clang attached.
Generated the .ll like so:
clang++ -S -emit-llvm -mllvm -disable-llvm-optzns [-g -m64 -static -mfpmath=sse
-march=core-avx2]</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>