Make it harder for compiler to optimize away SIMD CMake tests
authorErik Lindahl <erik@kth.se>
Sun, 22 Jun 2014 06:26:40 +0000 (08:26 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 25 Jun 2014 17:24:52 +0000 (19:24 +0200)
commitef0530b7e38bef6d0fdd5a4c55c3975e71ad897c
tree9f68cb46f1419f34454bb627d5f17f36cf692ba5
parent4347a4cde77eecd5b62f6df12a6db6cd9f9cea24
Make it harder for compiler to optimize away SIMD CMake tests

On at least one old version of Linux, a new compiler in
combination with an old assembler led to the compiler
understanding the SIMD code but optimizing it away, which made
the test pass even though the assembler could not handle it.
This changes the return value of the CMake tests to be based on
the SIMD operations, which should make them a lot more
difficult to optimize away.

Fixes #1493.

Change-Id: I3e021c3c718cf54afaadf131c5fa911b3933f61e
cmake/gmxTestSimd.cmake