Potential bug in double_m operator==
Georgios Bitzes
[please enable javascript to see the address]
Fri Jun 13 12:06:03 CEST 2014
operator== in sse/mask.h:112 is defined as MaskHelper<Size>::cmpeq (d.v(),
rhs.d.v())
And if VC_USE_PTEST is defined, cmpeq is still using testc (sse/mask.h:33)
0 != _mm_testc_si128(_mm_castps_si128(x), _mm_castps_si128(y));
mask_sse does succeed, but that's only because the auto-detection for
architecture fails on my Haswell, so it builds mask_sse without sse4:
CMake Warning at cmake/OptimizeForArchitecture.cmake:110 (message):
Your CPU (family 6, model 60) is not known. Auto-detection of
optimization
flags failed and will use the 65nm Core 2 CPU settings.
Call Stack (most recent call first):
cmake/OptimizeForArchitecture.cmake:159 (AutodetectHostArchitecture)
cmake/VcMacros.cmake:389 (OptimizeForArchitecture)
CMakeLists.txt:117 (vc_set_preferred_compiler_flags)
However, if I add the model number in OptimizeForArchitecture:
if(_cpu_model EQUAL 60)
set(TARGET_ARCHITECTURE "ivy-bridge")
The test then fails:
FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x42c26d): !(a == b)
FAIL: ┕ testCompareOperators<float_v>
FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x43118d): !(a == b)
FAIL: ┕ testCompareOperators<short_v>
FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x43338d): !(a == b)
FAIL: ┕ testCompareOperators<ushort_v>
FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x43763d): !(a == b)
FAIL: ┕ testCompareOperators<int_v>
FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x43cb41): !(a == b)
FAIL: ┕ testCompareOperators<double_v>
FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x441ced): !(a == b)
FAIL: ┕ testCompareOperators<uint_v>
Maybe it's also not detecting properly SSE4 support for your machine, too?
Have you tried just running the example in my first post using -msse4.2?
Cheers,
Georgios
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://compeng.uni-frankfurt.de/pipermail/vc/attachments/20140613/0b07ee67/attachment.html>
More information about the Vc
mailing list