Hi,
I found a crash because of unaligned memory access for intrinsic _mm256_cvtepi16_epi32(*ptr)
This looks strange because CPU support unaligned source operand for VPMOVSXWD(*mem),
but Intel's Compiler XE 15 generates two instructions for this intrinsic:
VMOWDQA(*mem) - load to xmm register first, then:
VPMOVSXWD(xmm)
This happens in Debug - mode only, for x86 and x64.
MSVC 2013 works fine in Debug / Release / x86 / x64
Sample code :
__m256i p = _mm256_cvtepi16_epi32(*((const __m128i *)&buff[i])); // <-- unaligned memory access
Solution:
__m256i p = _mm256_cvtepi16_epi32(_mm_loadu_si128((const __m128i *)&buff[i]));
Thanks
Zone:
Thread Topic:
Bug Report