summaryrefslogtreecommitdiffstats
path: root/lib/Headers/avx512vlbwintrin.h
diff options
context:
space:
mode:
authorMikhail Dvoretckii <mikhail.dvoretckii@intel.com>2018-07-10 08:22:44 +0000
committerMikhail Dvoretckii <mikhail.dvoretckii@intel.com>2018-07-10 08:22:44 +0000
commitb4d2cac846d91bba7f952a0ce7651425fb56d585 (patch)
tree6d93930c25e982f773813ed48f7791b801ab82c3 /lib/Headers/avx512vlbwintrin.h
parent5734eced0745f4cf3d04c6b07d5d048d8a785537 (diff)
[X86] Lowering integer truncation intrinsics to native IR
This patch lowers the _mm[256|512]_cvtepi{64|32|16}_epi{32|16|8} intrinsics to native IR in cases where the result's length is less than 128 bits. The resulting IR for 256-bit inputs is folded into VPMOV instructions, while for 128-bit inputs the vpshufb (or, in the 64-to-32-bit case, vinsertps) instructions are generated instead Differential Revision: https://reviews.llvm.org/D48712 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Headers/avx512vlbwintrin.h')
-rw-r--r--lib/Headers/avx512vlbwintrin.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Headers/avx512vlbwintrin.h b/lib/Headers/avx512vlbwintrin.h
index 72e07d0541..1b038dd04d 100644
--- a/lib/Headers/avx512vlbwintrin.h
+++ b/lib/Headers/avx512vlbwintrin.h
@@ -1496,10 +1496,10 @@ _mm256_maskz_cvtusepi16_epi8 (__mmask16 __M, __m256i __A) {
static __inline__ __m128i __DEFAULT_FN_ATTRS128
_mm_cvtepi16_epi8 (__m128i __A) {
-
- return (__m128i) __builtin_ia32_pmovwb128_mask ((__v8hi) __A,
- (__v16qi) _mm_setzero_si128(),
- (__mmask8) -1);
+ return (__m128i)__builtin_shufflevector(
+ __builtin_convertvector((__v8hi)__A, __v8qi),
+ (__v8qi){0, 0, 0, 0, 0, 0, 0, 0}, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS128