From 351ed42795d0dcc90330cfe83fca2c6d6804842e Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 24 Jul 2016 14:58:06 +0000 Subject: [PATCH] [X86] Block pbroadcastq instructions on 32-bit targets instead of pbroadcastb. Thanks to Simon Pilgrim for catching the mistake. llvm-svn: 276564 --- clang/lib/Headers/avx512bwintrin.h | 2 -- clang/lib/Headers/avx512vlbwintrin.h | 2 -- clang/lib/Sema/SemaChecking.cpp | 6 +++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/clang/lib/Headers/avx512bwintrin.h b/clang/lib/Headers/avx512bwintrin.h index 169d798c03c6..d3c5a6c96446 100644 --- a/clang/lib/Headers/avx512bwintrin.h +++ b/clang/lib/Headers/avx512bwintrin.h @@ -2099,7 +2099,6 @@ _mm512_maskz_mov_epi8 (__mmask64 __U, __m512i __A) (__v64qi) _mm512_setzero_hi ()); } -#ifdef __x86_64__ static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_mask_set1_epi8 (__m512i __O, __mmask64 __M, char __A) { @@ -2116,7 +2115,6 @@ _mm512_maskz_set1_epi8 (__mmask64 __M, char __A) _mm512_setzero_qi(), __M); } -#endif static __inline__ __mmask64 __DEFAULT_FN_ATTRS _mm512_kunpackd (__mmask64 __A, __mmask64 __B) diff --git a/clang/lib/Headers/avx512vlbwintrin.h b/clang/lib/Headers/avx512vlbwintrin.h index bacfb1713b9d..990e992a113f 100644 --- a/clang/lib/Headers/avx512vlbwintrin.h +++ b/clang/lib/Headers/avx512vlbwintrin.h @@ -2887,7 +2887,6 @@ _mm256_maskz_mov_epi8 (__mmask32 __U, __m256i __A) } -#ifdef __x86_64__ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_mask_set1_epi8 (__m128i __O, __mmask16 __M, char __A) { @@ -2921,7 +2920,6 @@ _mm256_maskz_set1_epi8 (__mmask32 __M, char __A) _mm256_setzero_si256 (), __M); } -#endif static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_mask_loadu_epi16 (__m128i __W, __mmask8 __U, void const *__P) diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 8ae0cbe49f7a..a6069cf5f4ec 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -1620,9 +1620,9 @@ bool Sema::CheckX86BuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { case X86::BI__builtin_ia32_rdgsbase64: case X86::BI__builtin_ia32_wrfsbase64: case X86::BI__builtin_ia32_wrgsbase64: - case X86::BI__builtin_ia32_pbroadcastb512_gpr_mask: - case X86::BI__builtin_ia32_pbroadcastb256_gpr_mask: - case X86::BI__builtin_ia32_pbroadcastb128_gpr_mask: + case X86::BI__builtin_ia32_pbroadcastq512_gpr_mask: + case X86::BI__builtin_ia32_pbroadcastq256_gpr_mask: + case X86::BI__builtin_ia32_pbroadcastq128_gpr_mask: case X86::BI__builtin_ia32_vcvtsd2si64: case X86::BI__builtin_ia32_vcvtsd2usi64: case X86::BI__builtin_ia32_vcvtss2si64: