- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page