- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to zero extend packed unsigned 8-bit integers with an AVX intrinsic. Question: How do you generate a "vpmovzxbd xmm, xmm" instruction with intrinsics. There seems to exist something close: __m256i _mm256_cvtepu8_epi32 (__m128i a) which generates "vpmovzxbd ymm, xmm", but this is AVX2. Regards HJ!
- Tags:
- Intel® Advanced Vector Extensions (Intel® AVX)
- Intel® Streaming SIMD Extensions
- Parallel Computing
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AVX does not provide support for 256-bit integer instructions. 128-bit vpmovzxbd can be generated with _mm_cvtepu8_epi32, but it will only extend the lower 4 bytes. If you aim to process all bytes in the vector your best approach is to use unpack intrinsics.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
I didn't realize that _mm_cvtepu8_epi32 would generate different instructions: pmovzxbd and vpmovzxbd depending on the "Enabled Enhanced Instruction Set" compiler parameter.

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