Index: cfe/trunk/lib/Headers/avx512fintrin.h =================================================================== --- cfe/trunk/lib/Headers/avx512fintrin.h +++ cfe/trunk/lib/Headers/avx512fintrin.h @@ -6617,6 +6617,86 @@ __addr, (__v8si) __index, __mask , __scale);\ }) +#define _mm512_i64scatter_ps(__addr,__index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scatterdiv16sf(__addr, (__mmask8) -1,\ + (__v8di) __index, (__v8sf) __v1, __scale);\ +}) + +#define _mm512_mask_i64scatter_ps(__addr, __mask,__index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scatterdiv16sf(__addr, __mask,\ + (__v8di) __index, (__v8sf) __v1, __scale);\ +}) + +#define _mm512_i64scatter_epi32(__addr, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scatterdiv16si (__addr, (__mmask8) -1,\ + (__v8di) __index, (__v8si) __v1, __scale);\ +}) + +#define _mm512_mask_i64scatter_epi32(__addr, __mask, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scatterdiv16si (__addr, __mask, (__v8di) __index,\ + (__v8si) __v1, __scale);\ +}) + +#define _mm512_i64scatter_pd( __addr, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scatterdiv8df (__addr, (__mmask8) -1,\ + (__v8di) __index, (__v8df) __v1, __scale);\ +}) + +#define _mm512_mask_i64scatter_pd( __addr, __mask, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scatterdiv8df (__addr, __mask, (__v8di) __index,\ + (__v8df) __v1, __scale);\ +}) + +#define _mm512_i64scatter_epi64( __addr, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scatterdiv8di (__addr, (__mmask8) -1,\ + (__v8di) __index, (__v8di) __v1, __scale);\ +}) + +#define _mm512_mask_i64scatter_epi64( __addr, __mask, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scatterdiv8di(__addr, __mask, (__v8di) __index,\ + (__v8di) __v1, __scale);\ +}) + +#define _mm512_i32scatter_ps( __addr, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scattersiv16sf (__addr, (__mmask16) -1,\ + (__v16si) __index, (__v16sf) __v1, __scale);\ +}) + +#define _mm512_mask_i32scatter_ps( __addr, __mask, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scattersiv16sf (__addr, __mask, (__v16si) __index,\ + (__v16sf) __v1, __scale);\ +}) + +#define _mm512_i32scatter_epi32( __addr, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scattersiv16si (__addr, (__mmask16) -1,\ + (__v16si) __index, (__v16si) __v1, __scale);\ +}) + +#define _mm512_mask_i32scatter_epi32( __addr, __mask, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scattersiv16si (__addr, __mask, (__v16si) __index,\ + (__v16si) __v1, __scale);\ +}) + +#define _mm512_i32scatter_pd( __addr, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scattersiv8df (__addr, (__mmask8) -1,\ + (__v8si) __index, (__v8df) __v1, __scale);\ +}) + +#define _mm512_mask_i32scatter_pd( __addr, __mask, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scattersiv8df (__addr, __mask, (__v8si) __index,\ + (__v8df) __v1, __scale);\ +}) + +#define _mm512_i32scatter_epi64( __addr, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scattersiv8di (__addr, (__mmask8) -1,\ + (__v8si) __index, (__v8di) __v1, __scale);\ +}) + +#define _mm512_mask_i32scatter_epi64( __addr, __mask, __index, __v1, __scale) __extension__ ({\ +__builtin_ia32_scattersiv8di (__addr, __mask, (__v8si) __index,\ + (__v8di) __v1, __scale);\ +}) + static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_mask_fmadd_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) { Index: cfe/trunk/lib/Headers/avx512pfintrin.h =================================================================== --- cfe/trunk/lib/Headers/avx512pfintrin.h +++ cfe/trunk/lib/Headers/avx512pfintrin.h @@ -47,6 +47,45 @@ __builtin_ia32_gatherpfqps (mask, (__v8di) index, (int const *) addr, scale, hint);\ }) +#define _mm512_prefetch_i32scatter_pd(addr, index, scale, hint) __extension__ ({\ +__builtin_ia32_scatterpfdpd ((__mmask8) -1, (__v8si) index, \ + (void *)addr, scale, hint);\ +}) + +#define _mm512_mask_prefetch_i32scatter_pd(addr, mask, index, scale, hint) __extension__ ({\ +__builtin_ia32_scatterpfdpd (mask, (__v8si) index, (void *) addr,\ + scale, hint);\ +}) + +#define _mm512_prefetch_i32scatter_ps(addr, index, scale, hint) __extension__ ({\ +__builtin_ia32_scatterpfdps ((__mmask16) -1, (__v16si) index, (void *) addr,\ + scale, hint);\ +}) + +#define _mm512_mask_prefetch_i32scatter_ps(addr, mask, index, scale, hint) __extension__ ({\ +__builtin_ia32_scatterpfdps (mask, (__v16si) index, (void *) addr,\ + scale, hint);\ +}) + +#define _mm512_prefetch_i64scatter_pd(addr, index, scale, hint) __extension__ ({\ +__builtin_ia32_scatterpfqpd ((__mmask8) -1, (__v8di) index, (void *) addr,\ + scale, hint);\ +}) + +#define _mm512_mask_prefetch_i64scatter_pd(addr, mask, index, scale, hint) __extension__ ({\ +__builtin_ia32_scatterpfqpd (mask, (__v8di) index, (void *) addr,\ + scale, hint);\ +}) + +#define _mm512_prefetch_i64scatter_ps(addr, index, scale, hint) __extension__ ({\ +__builtin_ia32_scatterpfqps ((__mmask8) -1, (__v8di) index, (void *) addr,\ + scale, hint);\ +}) + +#define _mm512_mask_prefetch_i64scatter_ps(addr, mask, index, scale, hint) __extension__ ({\ +__builtin_ia32_scatterpfqps (mask, (__v8di) index, (void *) addr,\ + scale, hint);\ +}) #undef __DEFAULT_FN_ATTRS Index: cfe/trunk/test/CodeGen/avx512f-builtins.c =================================================================== --- cfe/trunk/test/CodeGen/avx512f-builtins.c +++ cfe/trunk/test/CodeGen/avx512f-builtins.c @@ -4370,6 +4370,102 @@ return _mm512_mask_i32gather_epi64(__v1_old, __mask, __index, __addr, 2); } +void test_mm512_i64scatter_ps(void *__addr, __m512i __index, __m256 __v1) { + // CHECK-LABEL: @test_mm512_i64scatter_ps + // CHECK: @llvm.x86.avx512.scatter.qps.512 + return _mm512_i64scatter_ps(__addr, __index, __v1, 2); +} + +void test_mm512_mask_i64scatter_ps(void *__addr, __mmask8 __mask, __m512i __index, __m256 __v1) { + // CHECK-LABEL: @test_mm512_mask_i64scatter_ps + // CHECK: @llvm.x86.avx512.scatter.qps.512 + return _mm512_mask_i64scatter_ps(__addr, __mask, __index, __v1, 2); +} + +void test_mm512_i64scatter_epi32(void *__addr, __m512i __index, __m256i __v1) { + // CHECK-LABEL: @test_mm512_i64scatter_epi32 + // CHECK: @llvm.x86.avx512.scatter.qpi.512 + return _mm512_i64scatter_epi32(__addr, __index, __v1, 2); +} + +void test_mm512_mask_i64scatter_epi32(void *__addr, __mmask8 __mask, __m512i __index, __m256i __v1) { + // CHECK-LABEL: @test_mm512_mask_i64scatter_epi32 + // CHECK: @llvm.x86.avx512.scatter.qpi.512 + return _mm512_mask_i64scatter_epi32(__addr, __mask, __index, __v1, 2); +} + +void test_mm512_i64scatter_pd(void *__addr, __m512i __index, __m512d __v1) { + // CHECK-LABEL: @test_mm512_i64scatter_pd + // CHECK: @llvm.x86.avx512.scatter.qpd.512 + return _mm512_i64scatter_pd(__addr, __index, __v1, 2); +} + +void test_mm512_mask_i64scatter_pd(void *__addr, __mmask8 __mask, __m512i __index, __m512d __v1) { + // CHECK-LABEL: @test_mm512_mask_i64scatter_pd + // CHECK: @llvm.x86.avx512.scatter.qpd.512 + return _mm512_mask_i64scatter_pd(__addr, __mask, __index, __v1, 2); +} + +void test_mm512_i64scatter_epi64(void *__addr, __m512i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_i64scatter_epi64 + // CHECK: @llvm.x86.avx512.scatter.qpq.512 + return _mm512_i64scatter_epi64(__addr, __index, __v1, 2); +} + +void test_mm512_mask_i64scatter_epi64(void *__addr, __mmask8 __mask, __m512i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_mask_i64scatter_epi64 + // CHECK: @llvm.x86.avx512.scatter.qpq.512 + return _mm512_mask_i64scatter_epi64(__addr, __mask, __index, __v1, 2); +} + +void test_mm512_i32scatter_ps(void *__addr, __m512i __index, __m512 __v1) { + // CHECK-LABEL: @test_mm512_i32scatter_ps + // CHECK: @llvm.x86.avx512.scatter.dps.512 + return _mm512_i32scatter_ps(__addr, __index, __v1, 2); +} + +void test_mm512_mask_i32scatter_ps(void *__addr, __mmask16 __mask, __m512i __index, __m512 __v1) { + // CHECK-LABEL: @test_mm512_mask_i32scatter_ps + // CHECK: @llvm.x86.avx512.scatter.dps.512 + return _mm512_mask_i32scatter_ps(__addr, __mask, __index, __v1, 2); +} + +void test_mm512_i32scatter_epi32(void *__addr, __m512i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_i32scatter_epi32 + // CHECK: @llvm.x86.avx512.scatter.dpi.512 + return _mm512_i32scatter_epi32(__addr, __index, __v1, 2); +} + +void test_mm512_mask_i32scatter_epi32(void *__addr, __mmask16 __mask, __m512i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_mask_i32scatter_epi32 + // CHECK: @llvm.x86.avx512.scatter.dpi.512 + return _mm512_mask_i32scatter_epi32(__addr, __mask, __index, __v1, 2); +} + +void test_mm512_i32scatter_pd(void *__addr, __m256i __index, __m512d __v1) { + // CHECK-LABEL: @test_mm512_i32scatter_pd + // CHECK: @llvm.x86.avx512.scatter.dpd.512 + return _mm512_i32scatter_pd(__addr, __index, __v1, 2); +} + +void test_mm512_mask_i32scatter_pd(void *__addr, __mmask8 __mask, __m256i __index, __m512d __v1) { + // CHECK-LABEL: @test_mm512_mask_i32scatter_pd + // CHECK: @llvm.x86.avx512.scatter.dpd.512 + return _mm512_mask_i32scatter_pd(__addr, __mask, __index, __v1, 2); +} + +void test_mm512_i32scatter_epi64(void *__addr, __m256i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_i32scatter_epi64 + // CHECK: @llvm.x86.avx512.scatter.dpq.512 + return _mm512_i32scatter_epi64(__addr, __index, __v1, 2); +} + +void test_mm512_mask_i32scatter_epi64(void *__addr, __mmask8 __mask, __m256i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_mask_i32scatter_epi64 + // CHECK: @llvm.x86.avx512.scatter.dpq.512 + return _mm512_mask_i32scatter_epi64(__addr, __mask, __index, __v1, 2); +} + __m128d test_mm_mask_rsqrt14_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ // CHECK-LABEL: @test_mm_mask_rsqrt14_sd // CHECK: @llvm.x86.avx512.rsqrt14.sd Index: cfe/trunk/test/CodeGen/avx512pf-builtins.c =================================================================== --- cfe/trunk/test/CodeGen/avx512pf-builtins.c +++ cfe/trunk/test/CodeGen/avx512pf-builtins.c @@ -28,3 +28,51 @@ // CHECK: @llvm.x86.avx512.gatherpf.qps return _mm512_mask_prefetch_i64gather_ps(index, mask, addr, 2, 1); } + +void test_mm512_prefetch_i32scatter_pd(void *addr, __m256i index) { + // CHECK-LABEL: @test_mm512_prefetch_i32scatter_pd + // CHECK: @llvm.x86.avx512.scatterpf.dpd.512 + return _mm512_prefetch_i32scatter_pd(addr, index, 1, 2); +} + +void test_mm512_mask_prefetch_i32scatter_pd(void *addr, __mmask8 mask, __m256i index) { + // CHECK-LABEL: @test_mm512_mask_prefetch_i32scatter_pd + // CHECK: @llvm.x86.avx512.scatterpf.dpd.512 + return _mm512_mask_prefetch_i32scatter_pd(addr, mask, index, 1, 2); +} + +void test_mm512_prefetch_i32scatter_ps(void *addr, __m512i index) { + // CHECK-LABEL: @test_mm512_prefetch_i32scatter_ps + // CHECK: @llvm.x86.avx512.scatterpf.dps.512 + return _mm512_prefetch_i32scatter_ps(addr, index, 1, 2); +} + +void test_mm512_mask_prefetch_i32scatter_ps(void *addr, __mmask16 mask, __m512i index) { + // CHECK-LABEL: @test_mm512_mask_prefetch_i32scatter_ps + // CHECK: @llvm.x86.avx512.scatterpf.dps.512 + return _mm512_mask_prefetch_i32scatter_ps(addr, mask, index, 1, 2); +} + +void test_mm512_prefetch_i64scatter_pd(void *addr, __m512i index) { + // CHECK-LABEL: @test_mm512_prefetch_i64scatter_pd + // CHECK: @llvm.x86.avx512.scatterpf.qpd.512 + return _mm512_prefetch_i64scatter_pd(addr, index, 1, 2); +} + +void test_mm512_mask_prefetch_i64scatter_pd(void *addr, __mmask16 mask, __m512i index) { + // CHECK-LABEL: @test_mm512_mask_prefetch_i64scatter_pd + // CHECK: @llvm.x86.avx512.scatterpf.qpd.512 + return _mm512_mask_prefetch_i64scatter_pd(addr, mask, index, 1, 2); +} + +void test_mm512_prefetch_i64scatter_ps(void *addr, __m512i index) { + // CHECK-LABEL: @test_mm512_prefetch_i64scatter_ps + // CHECK: @llvm.x86.avx512.scatterpf.qps.512 + return _mm512_prefetch_i64scatter_ps(addr, index, 1, 2); +} + +void test_mm512_mask_prefetch_i64scatter_ps(void *addr, __mmask16 mask, __m512i index) { + // CHECK-LABEL: @test_mm512_mask_prefetch_i64scatter_ps + // CHECK: @llvm.x86.avx512.scatterpf.qps.512 + return _mm512_mask_prefetch_i64scatter_ps(addr, mask, index, 1, 2); +}