<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 --- - AVX512: _mm_loadu_ps alignment issue"
href="https://llvm.org/bugs/show_bug.cgi?id=30992">30992</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>AVX512: _mm_loadu_ps alignment issue
</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>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>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>Roland.Schulz@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>_mm_loadu_ps segfaults on unaligned memory address because it gets optimized to
aligned load (vmovaps). Simple unit tests pass so I'm not sure how to generate
a simple reproducer.
Steps to reproduce:
git clone -b clang <a href="https://github.com/rolandschulz/gromacs.git">https://github.com/rolandschulz/gromacs.git</a>
cd gromacs
mkdir build
cd build
CFLAGS=-g CXXFLAGS=-g CC=clang CXX=clang++ cmake -DGMX_SIMD=AVX_512_KNL
-DGMX_BUILD_HELP=OFF -DBUILD_SHARED_LIBS=no ..
make -j20 gmx
./bin/gmx mdrun -s ../topol.tpr -nt 1
Segfault at:
asm> vmovaps (%r11,%r8,4),%xmm6
src> gri_S3 = load4U(grid+index_x+(j0+3)*pnz+k0);
(gdb) p/x $r11+$r8*4
$2 = 0x7ffff7e64914
load4U is a simple wrapper:
static inline Simd4Float gmx_simdcall
load4U(const float *m) {
return { _mm_loadu_ps(m) };
}</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>