[LLVMbugs] [Bug 15282] New: clang 3.2 generates buggy code from AVX + FMA instrinsics

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 15 13:49:22 PST 2013


            Bug ID: 15282
           Summary: clang 3.2 generates buggy code from AVX + FMA
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sin.pecado at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The code in question is the GROMACS molecular dynamics simulation package
(www.gromacs.org). GROMACS, an HPC code, has a heavily optimized C codebase. It
is widely used in academia, is and available through packages in all major
Linux distributions, and it is the "engine" of Folding at Home.

The new 4.6 release includes, among others, AVX + FMA SIMD kernels. These
kernels do compile, but the generate code that seems to be incorrect. The code
compiles and runs fine (i.e passes our regressiontests) with gcc and msvc as
well as icc (using FMA3).

I know that a limited repro case would be preferred, but that is rather
difficult toa achieve.

However, reproducing hte issue is fairly simple and can be summarized in a few

* Get the code:

Release 4.6:
wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-4.6.tar.gz

or the current stable development version:
git clone git://git.gromacs.org/gromacs -b release-4-6 gromacs-4.6

* Build the code and execute regressiont tests (requires and AMD Bulldozer or
Piledriver CPU!):
mkdir build_gmx_avx && cd build_gmx_avx && CC=clang-3.2 cmake ../gromacs-4.6

Most of the tests will fail.

* If you now build with the SSE4.1 SIMD kernels the tests will pass:

mkdir build_gmx_sse41 && cd build_gmx_sse41 && CC=clang-3.2 cmake
make check

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/20130215/d0bd3d7a/attachment.html>

More information about the llvm-bugs mailing list