Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7835 Discussions

bug report for XE 15: unaligned access in _mm256_cvtepi16_epi32()

Ivan_K_7
Beginner
185 Views
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)); // <-- unaligned memory access Solution: __m256i p = _mm256_cvtepi16_epi32(_mm_loadu_si128((const __m128i *)&buff)); Thanks
0 Kudos
1 Reply
Yuan_C_Intel
Employee
185 Views

Hi, Ivan

Thank you for reporting the issue.

I verified this issue was resolved in 17.0. In debug mode, unaligned move: vmovdqu will be generated.

Could you upgrade to 17.0 to verify?

Thanks.

 

 

0 Kudos
Reply