[llvm-bugs] [Bug 30992] New: AVX512: _mm_loadu_ps alignment issue

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 11 16:26:26 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=30992

            Bug ID: 30992
           Summary: AVX512: _mm_loadu_ps alignment issue
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: Roland.Schulz at Intel.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

_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 https://github.com/rolandschulz/gromacs.git
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) };
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161112/eea1bdee/attachment.html>


More information about the llvm-bugs mailing list