From 350729627ab74c654659eef85251b6d0bf4165d0 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 31 Oct 2016 05:49:11 +0000 Subject: [PATCH] [AVX-512] Use selectd instead of selectps for _mm256_mask_extracti32x4_epi32. llvm-svn: 285545 --- clang/lib/Headers/avx512vlintrin.h | 4 ++-- clang/test/CodeGen/avx512vl-builtins.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/lib/Headers/avx512vlintrin.h b/clang/lib/Headers/avx512vlintrin.h index 42e5d918cb2d..35394583e4f5 100644 --- a/clang/lib/Headers/avx512vlintrin.h +++ b/clang/lib/Headers/avx512vlintrin.h @@ -8299,12 +8299,12 @@ _mm256_mask_cvtepi64_storeu_epi16 (void * __P, __mmask8 __M, __m256i __A) ((imm) & 1) ? 7 : 3); }) #define _mm256_mask_extracti32x4_epi32(W, U, A, imm) __extension__ ({ \ - (__m128i)__builtin_ia32_selectps_128((__mmask8)(U), \ + (__m128i)__builtin_ia32_selectd_128((__mmask8)(U), \ (__v4si)_mm256_extracti32x4_epi32((A), (imm)), \ (__v4si)(W)); }) #define _mm256_maskz_extracti32x4_epi32(U, A, imm) __extension__ ({ \ - (__m128i)__builtin_ia32_selectps_128((__mmask8)(U), \ + (__m128i)__builtin_ia32_selectd_128((__mmask8)(U), \ (__v4si)_mm256_extracti32x4_epi32((A), (imm)), \ (__v4si)_mm_setzero_si128()); }) diff --git a/clang/test/CodeGen/avx512vl-builtins.c b/clang/test/CodeGen/avx512vl-builtins.c index 147522be19ba..1eaa469d5e6f 100644 --- a/clang/test/CodeGen/avx512vl-builtins.c +++ b/clang/test/CodeGen/avx512vl-builtins.c @@ -6582,14 +6582,14 @@ __m128i test_mm256_extracti32x4_epi32(__m256i __A) { __m128i test_mm256_mask_extracti32x4_epi32(__m128i __W, __mmask8 __U, __m256i __A) { // CHECK-LABEL: @test_mm256_mask_extracti32x4_epi32 // CHECK: shufflevector <8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <4 x i32> - // CHECK: select <4 x i1> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}} + // CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}} return _mm256_mask_extracti32x4_epi32(__W, __U, __A, 1); } __m128i test_mm256_maskz_extracti32x4_epi32(__mmask8 __U, __m256i __A) { // CHECK-LABEL: @test_mm256_maskz_extracti32x4_epi32 // CHECK: shufflevector <8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <4 x i32> - // CHECK: select <4 x i1> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}} + // CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}} return _mm256_maskz_extracti32x4_epi32(__U, __A, 1); }