MSVC Support

  • MSVC 2012 64-bit is supported.
  • MSVC 2012 32-bit is supported for SSE. When compiling for AVX, MSVC may miscompile AVX load and stores of temporary objects to unaligned addresses. This results in random crashes. Better compile for 64-bit only when you want AVX. If you need a 32-bit binary for AVX the GCC compiler is a good alternative.
  • MSVC 2010 is supported for SSE. This compiler also introduces incorrectly aligned loads and stores when compiling for AVX, leading to crashes.



There is a rather fundamental issue with MSVC that makes using Vc slightly awkward: objects that have a defined alignment restriction cannot be passed by value. Especially bad is that this breaks some of the common type traits implementations if an aligned type is used. Vc types should work with the type traits implemented inside Vc, as the problem can be worked around via template specialization. Also, the 64-bit Windows calling convention passes SIMD vectors via memory, making const-ref always more efficient than passing by-value. This is different on Linux where passing by-value is preferred over passing by const-ref.


On Windows you can also work with GCC instead. The MSYS GCC works fine and can create miscompilation-free 32-bit executables that support AVX.