+2017-02-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79481
+ * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
+ _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
+ _mm512_prefetch_i64gather_ps): New inline functions and macros.
+
2017-02-14 Uros Bizjak <ubizjak@gmail.com>
PR target/79495
typedef unsigned short __mmask16;
#ifdef __OPTIMIZE__
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_prefetch_i32gather_pd (__m256i __index, void const *__addr,
+ int __scale, int __hint)
+{
+ __builtin_ia32_gatherpfdpd ((__mmask8) 0xFF, (__v8si) __index, __addr,
+ __scale, __hint);
+}
+
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_prefetch_i32gather_ps (__m512i __index, void const *__addr,
+ int __scale, int __hint)
+{
+ __builtin_ia32_gatherpfdps ((__mmask16) 0xFFFF, (__v16si) __index, __addr,
+ __scale, __hint);
+}
+
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_prefetch_i32gather_pd (__m256i __index, __mmask8 __mask,
__hint);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_prefetch_i64gather_pd (__m512i __index, void const *__addr,
+ int __scale, int __hint)
+{
+ __builtin_ia32_gatherpfqpd ((__mmask8) 0xFF, (__v8di) __index, __addr,
+ __scale, __hint);
+}
+
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_prefetch_i64gather_ps (__m512i __index, void const *__addr,
+ int __scale, int __hint)
+{
+ __builtin_ia32_gatherpfqps ((__mmask8) 0xFF, (__v8di) __index, __addr,
+ __scale, __hint);
+}
+
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_prefetch_i64gather_pd (__m512i __index, __mmask8 __mask,
}
#else
+#define _mm512_prefetch_i32gather_pd(INDEX, ADDR, SCALE, HINT) \
+ __builtin_ia32_gatherpfdpd ((__mmask8)0xFF, (__v8si)(__m256i)INDEX, \
+ (void const *)ADDR, (int)SCALE, (int)HINT)
+
+#define _mm512_prefetch_i32gather_ps(INDEX, ADDR, SCALE, HINT) \
+ __builtin_ia32_gatherpfdps ((__mmask16)0xFFFF, (__v16si)(__m512i)INDEX, \
+ (void const *)ADDR, (int)SCALE, (int)HINT)
+
#define _mm512_mask_prefetch_i32gather_pd(INDEX, MASK, ADDR, SCALE, HINT) \
__builtin_ia32_gatherpfdpd ((__mmask8)MASK, (__v8si)(__m256i)INDEX, \
(void const *)ADDR, (int)SCALE, (int)HINT)
__builtin_ia32_gatherpfdps ((__mmask16)MASK, (__v16si)(__m512i)INDEX, \
(void const *)ADDR, (int)SCALE, (int)HINT)
+#define _mm512_prefetch_i64gather_pd(INDEX, ADDR, SCALE, HINT) \
+ __builtin_ia32_gatherpfqpd ((__mmask8)0xFF, (__v8di)(__m512i)INDEX, \
+ (void *)ADDR, (int)SCALE, (int)HINT)
+
+#define _mm512_prefetch_i64gather_ps(INDEX, ADDR, SCALE, HINT) \
+ __builtin_ia32_gatherpfqps ((__mmask8)0xFF, (__v8di)(__m512i)INDEX, \
+ (void *)ADDR, (int)SCALE, (int)HINT)
+
#define _mm512_mask_prefetch_i64gather_pd(INDEX, MASK, ADDR, SCALE, HINT) \
__builtin_ia32_gatherpfqpd ((__mmask8)MASK, (__v8di)(__m512i)INDEX, \
(void *)ADDR, (int)SCALE, (int)HINT)
+2017-02-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79481
+ * gcc.target/i386/sse-14.c (test_2vx): Add void return type.
+ (test_3vx): Change return type from int to void.
+ (_mm512_prefetch_i32gather_ps, _mm512_prefetch_i32scatter_ps,
+ _mm512_prefetch_i64gather_ps, _mm512_prefetch_i64scatter_ps,
+ _mm512_prefetch_i32gather_pd, _mm512_prefetch_i32scatter_pd,
+ _mm512_prefetch_i64gather_pd, _mm512_prefetch_i64scatter_pd): New
+ tests.
+ * gcc.target/i386/sse-22.c (test_2vx): Add void return type.
+ (test_3vx): Change return type from int to void.
+ (_mm512_prefetch_i32gather_ps, _mm512_prefetch_i32scatter_ps,
+ _mm512_prefetch_i64gather_ps, _mm512_prefetch_i64scatter_ps,
+ _mm512_prefetch_i32gather_pd, _mm512_prefetch_i32scatter_pd,
+ _mm512_prefetch_i64gather_pd, _mm512_prefetch_i64scatter_pd): New
+ tests.
+ * gcc.target/i386/avx512pf-vgatherpf0dpd-1.c: Add non-masked
+ intrinsic. Change scan-assembler-times number from 1 to 2.
+ * gcc.target/i386/avx512pf-vgatherpf0dps-1.c: Likewise.
+ * gcc.target/i386/avx512pf-vgatherpf0qpd-1.c: Likewise.
+ * gcc.target/i386/avx512pf-vgatherpf0qps-1.c: Likewise.
+ * gcc.target/i386/avx512pf-vgatherpf1dpd-1.c: Likewise.
+ * gcc.target/i386/avx512pf-vgatherpf1dps-1.c: Likewise.
+ * gcc.target/i386/avx512pf-vgatherpf1qpd-1.c: Likewise.
+ * gcc.target/i386/avx512pf-vgatherpf1qps-1.c: Likewise.
+
2017-02-14 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/61225
/* { dg-do compile } */
/* { dg-options "-mavx512pf -O2" } */
-/* { dg-final { scan-assembler-times "vgatherpf0dpd\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vgatherpf0dpd\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
void extern
avx512pf_test (void)
{
+ _mm512_prefetch_i32gather_pd (idx, base, 8, _MM_HINT_T0);
_mm512_mask_prefetch_i32gather_pd (idx, m8, base, 8, _MM_HINT_T0);
}
/* { dg-do compile } */
/* { dg-options "-mavx512pf -O2" } */
-/* { dg-final { scan-assembler-times "vgatherpf0dps\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vgatherpf0dps\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
void extern
avx512pf_test (void)
{
+ _mm512_prefetch_i32gather_ps (idx, base, 8, _MM_HINT_T0);
_mm512_mask_prefetch_i32gather_ps (idx, m16, base, 8, _MM_HINT_T0);
}
/* { dg-do compile } */
/* { dg-options "-mavx512pf -O2" } */
-/* { dg-final { scan-assembler-times "vgatherpf0qpd\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vgatherpf0qpd\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
void extern
avx512pf_test (void)
{
+ _mm512_prefetch_i64gather_pd (idx, base, 8, _MM_HINT_T0);
_mm512_mask_prefetch_i64gather_pd (idx, m8, base, 8, _MM_HINT_T0);
}
/* { dg-do compile } */
/* { dg-options "-mavx512pf -O2" } */
-/* { dg-final { scan-assembler-times "vgatherpf0qps\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vgatherpf0qps\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
void extern
avx512pf_test (void)
{
+ _mm512_prefetch_i64gather_ps (idx, base, 8, _MM_HINT_T0);
_mm512_mask_prefetch_i64gather_ps (idx, m8, base, 8, _MM_HINT_T0);
}
/* { dg-do compile } */
/* { dg-options "-mavx512pf -O2" } */
-/* { dg-final { scan-assembler-times "vgatherpf1dpd\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vgatherpf1dpd\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
void extern
avx512pf_test (void)
{
+ _mm512_prefetch_i32gather_pd (idx, base, 8, _MM_HINT_T1);
_mm512_mask_prefetch_i32gather_pd (idx, m8, base, 8, _MM_HINT_T1);
}
/* { dg-do compile } */
/* { dg-options "-mavx512pf -O2" } */
-/* { dg-final { scan-assembler-times "vgatherpf1dps\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vgatherpf1dps\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
void extern
avx512pf_test (void)
{
+ _mm512_prefetch_i32gather_ps (idx, base, 8, _MM_HINT_T1);
_mm512_mask_prefetch_i32gather_ps (idx, m16, base, 8, _MM_HINT_T1);
}
/* { dg-do compile } */
/* { dg-options "-mavx512pf -O2" } */
-/* { dg-final { scan-assembler-times "vgatherpf1qpd\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vgatherpf1qpd\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
void extern
avx512pf_test (void)
{
+ _mm512_prefetch_i64gather_pd (idx, base, 8, _MM_HINT_T1);
_mm512_mask_prefetch_i64gather_pd (idx, m8, base, 8, _MM_HINT_T1);
}
/* { dg-do compile } */
/* { dg-options "-mavx512pf -O2" } */
-/* { dg-final { scan-assembler-times "vgatherpf1qps\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vgatherpf1qps\[ \\t\]+\[^\{\n\]*\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
void extern
avx512pf_test (void)
{
+ _mm512_prefetch_i64gather_ps (idx, base, 8, _MM_HINT_T1);
_mm512_mask_prefetch_i64gather_ps (idx, m8, base, 8, _MM_HINT_T1);
}
{ return func (A, B, imm1, imm2, imm3); }
#define test_2vx(func, op1_type, op2_type, imm1, imm2) \
- _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L) \
+ void _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L) \
{ func (A, B, imm1, imm2); }
#define test_3(func, type, op1_type, op2_type, op3_type, imm) \
{ func (A, B, C, imm); }
#define test_3vx(func, op1_type, op2_type, op3_type, imm1, imm2) \
- int _CONCAT(_,func) (op1_type A, op2_type B, \
+ void _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, int const I, int const L) \
{ func (A, B, C, imm1, imm2); }
test_4x (_mm_maskz_fixupimm_round_ss, __m128, __mmask8, __m128, __m128, __m128i, 1, 8)
/* avx512pfintrin.h */
+test_2vx (_mm512_prefetch_i32gather_ps, __m512i, void const *, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i32scatter_ps, void const *, __m512i, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i64gather_ps, __m512i, void const *, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i64scatter_ps, void const *, __m512i, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i32gather_pd, __m256i, void const *, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i32scatter_pd, void const *, __m256i, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i64gather_pd, __m512i, void const *, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i64scatter_pd, void const *, __m512i, 1, _MM_HINT_T0)
test_3vx (_mm512_mask_prefetch_i32gather_ps, __m512i, __mmask16, void const *, 1, _MM_HINT_T0)
test_3vx (_mm512_mask_prefetch_i32scatter_ps, void const *, __mmask16, __m512i, 1, _MM_HINT_T0)
test_3vx (_mm512_mask_prefetch_i64gather_ps, __m512i, __mmask8, void const *, 1, _MM_HINT_T0)
{ return func (A, B, imm1, imm2, imm3); }
#define test_2vx(func, op1_type, op2_type, imm1, imm2) \
- _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L) \
+ void _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L) \
{ func (A, B, imm1, imm2); }
#define test_3(func, type, op1_type, op2_type, op3_type, imm) \
{ func (A, B, C, imm); }
#define test_3vx(func, op1_type, op2_type, op3_type, imm1, imm2) \
- int _CONCAT(_,func) (op1_type A, op2_type B, \
+ void _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, int const I, int const L) \
{ func (A, B, C, imm1, imm2); }
test_4x (_mm_maskz_fixupimm_round_ss, __m128, __mmask8, __m128, __m128, __m128i, 1, 8)
/* avx512pfintrin.h */
+test_2vx (_mm512_prefetch_i32gather_ps, __m512i, void const *, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i32scatter_ps, void const *, __m512i, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i64gather_ps, __m512i, void const *, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i64scatter_ps, void const *, __m512i, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i32gather_pd, __m256i, void const *, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i32scatter_pd, void const *, __m256i, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i64gather_pd, __m512i, long long *, 1, _MM_HINT_T0)
+test_2vx (_mm512_prefetch_i64scatter_pd, void const *, __m512i, 1, _MM_HINT_T0)
test_3vx (_mm512_mask_prefetch_i32gather_ps, __m512i, __mmask16, void const *, 1, _MM_HINT_T0)
test_3vx (_mm512_mask_prefetch_i32scatter_ps, void const *, __mmask16, __m512i, 1, _MM_HINT_T0)
test_3vx (_mm512_mask_prefetch_i64gather_ps, __m512i, __mmask8, void const *, 1, _MM_HINT_T0)
test_3vx (_mm512_mask_prefetch_i64scatter_ps, void const *, __mmask8, __m512i, 1, _MM_HINT_T0)
-
test_3vx (_mm512_mask_prefetch_i32gather_pd, __m256i, __mmask8, void const *, 1, _MM_HINT_T0)
test_3vx (_mm512_mask_prefetch_i32scatter_pd, void const *, __mmask8, __m256i, 1, _MM_HINT_T0)
test_3vx (_mm512_mask_prefetch_i64gather_pd, __m512i, __mmask8, long long *, 1, _MM_HINT_T0)