[PATCH] D20468: [X86][AVX] Ensure zero-extension of _mm256_extract_epi8 and _mm256_extract_epi16

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Fri May 20 09:49:21 PDT 2016

RKSimon added a comment.

In http://reviews.llvm.org/D20468#435522, @mkuper wrote:

> Could you point me to where in the documentation it says they must be zero-extended?
>  The Intel intrinsics guide actually has them with shorter return types:
>   __int8 _mm256_extract_epi8 (__m256i a, const int index)
>   __int16 _mm256_extract_epi16 (__m256i a, const int index)

And the gcc version has them wrapped to the _mm_extract_epi* intrinsics which map to the real 128-bit instructions which do zero-extend.

I'm open to changing the return types in the headers instead, but really I'd expect the mm256 versions to zero extend like the older mm versions.



More information about the cfe-commits mailing list