<html>
<head>
<base href="http://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 --- - clang 3.2 generates buggy code from AVX + FMA instrinsics"
href="http://llvm.org/bugs/show_bug.cgi?id=15282">15282</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang 3.2 generates buggy code from AVX + FMA instrinsics
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</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>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sin.pecado@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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@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
steps:
* Get the code:
Release 4.6:
wget <a href="ftp://ftp.gromacs.org/pub/gromacs/gromacs-4.6.tar.gz">ftp://ftp.gromacs.org/pub/gromacs/gromacs-4.6.tar.gz</a>
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
-DGMX_CPU_ACCELERATION=AVX_128_FMA -DREGRESSIONTEST_DOWNLOAD=ON && make check
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
../gromacs-4.6 -DGMX_CPU_ACCELERATION=SSE4.1 -DREGRESSIONTEST_DOWNLOAD=ON &&
make check</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>