re PR target/85530 ([X86] _mm512_mullox_epi64 and _mm512_mask_mullox_epi64 not implemented)
PR target/85530 * config/i386/avx512fintrin.h (_mm512_mullox_epi64, _mm512_mask_mullox_epi64): New intrinsics. * gcc.target/i386/avx512f-vpmullq-1.c: New test. * gcc.target/i386/avx512f-vpmullq-2.c: New test. * gcc.target/i386/avx512dq-vpmullq-3.c: New test. * gcc.target/i386/avx512dq-vpmullq-4.c: New test. From-SVN: r259903
This commit is contained in:
parent
1ee021f2f3
commit
503ac4e037
@ -1,3 +1,9 @@
|
||||
2018-05-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/85530
|
||||
* config/i386/avx512fintrin.h (_mm512_mullox_epi64,
|
||||
_mm512_mask_mullox_epi64): New intrinsics.
|
||||
|
||||
2018-05-03 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR testsuite/85106
|
||||
|
@ -565,6 +565,20 @@ _mm512_mask_mullo_epi32 (__m512i __W, __mmask16 __M, __m512i __A, __m512i __B)
|
||||
(__v16si) __W, __M);
|
||||
}
|
||||
|
||||
extern __inline __m512i
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mullox_epi64 (__m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i) ((__v8du) __A * (__v8du) __B);
|
||||
}
|
||||
|
||||
extern __inline __m512i
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_mullox_epi64 (__m512i __W, __mmask8 __M, __m512i __A, __m512i __B)
|
||||
{
|
||||
return _mm512_mask_mov_epi64 (__W, __M, _mm512_mullox_epi64 (__A, __B));
|
||||
}
|
||||
|
||||
extern __inline __m512i
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_sllv_epi32 (__m512i __X, __m512i __Y)
|
||||
|
@ -1,3 +1,11 @@
|
||||
2018-05-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/85530
|
||||
* gcc.target/i386/avx512f-vpmullq-1.c: New test.
|
||||
* gcc.target/i386/avx512f-vpmullq-2.c: New test.
|
||||
* gcc.target/i386/avx512dq-vpmullq-3.c: New test.
|
||||
* gcc.target/i386/avx512dq-vpmullq-4.c: New test.
|
||||
|
||||
2018-05-03 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR testsuite/85106
|
||||
|
15
gcc/testsuite/gcc.target/i386/avx512dq-vpmullq-3.c
Normal file
15
gcc/testsuite/gcc.target/i386/avx512dq-vpmullq-3.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512dq -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
volatile __m512i _x1, _y1, _z1;
|
||||
|
||||
void extern
|
||||
avx512dq_test (void)
|
||||
{
|
||||
_x1 = _mm512_mullox_epi64 (_y1, _z1);
|
||||
_x1 = _mm512_mask_mullox_epi64 (_x1, 3, _y1, _z1);
|
||||
}
|
45
gcc/testsuite/gcc.target/i386/avx512dq-vpmullq-4.c
Normal file
45
gcc/testsuite/gcc.target/i386/avx512dq-vpmullq-4.c
Normal file
@ -0,0 +1,45 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -mavx512dq" } */
|
||||
/* { dg-require-effective-target avx512dq } */
|
||||
|
||||
#define AVX512DQ
|
||||
#include "avx512f-helper.h"
|
||||
|
||||
#define SIZE (AVX512F_LEN / 64)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
||||
void
|
||||
CALC (long long *src1, long long *src2, long long *dst)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
dst[i] = src1[i] * src2[i];
|
||||
}
|
||||
|
||||
void
|
||||
TEST (void)
|
||||
{
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2, dst1, dst2;
|
||||
long long dst_ref[SIZE];
|
||||
int i;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
{
|
||||
src1.a[i] = i + 50;
|
||||
src2.a[i] = i + 100;
|
||||
dst2.a[i] = DEFAULT_VALUE;
|
||||
}
|
||||
|
||||
dst1.x = INTRINSIC (_mullox_epi64) (src1.x, src2.x);
|
||||
dst2.x = INTRINSIC (_mask_mullox_epi64) (dst2.x, mask, src1.x, src2.x);
|
||||
CALC (src1.a, src2.a, dst_ref);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (dst1, dst_ref))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_q) (dst_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (dst2, dst_ref))
|
||||
abort ();
|
||||
}
|
20
gcc/testsuite/gcc.target/i386/avx512f-vpmullq-1.c
Normal file
20
gcc/testsuite/gcc.target/i386/avx512f-vpmullq-1.c
Normal file
@ -0,0 +1,20 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -mno-avx512dq -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "vpmuludq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 6 } } */
|
||||
/* { dg-final { scan-assembler-times "vpsrlq\[ \\t\]+\[^\{\n\]*\\\$32\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 4 } } */
|
||||
/* { dg-final { scan-assembler-times "vpsllq\[ \\t\]+\[^\{\n\]*\\\$32\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
|
||||
/* { dg-final { scan-assembler-times "vpaddq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 3 } } */
|
||||
/* { dg-final { scan-assembler-times "vpaddq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
volatile __m512i _x1, _y1, _z1;
|
||||
|
||||
void extern
|
||||
avx512f_test (void)
|
||||
{
|
||||
_x1 = _mm512_mullox_epi64 (_y1, _z1);
|
||||
_x1 = _mm512_mask_mullox_epi64 (_x1, 3, _y1, _z1);
|
||||
}
|
45
gcc/testsuite/gcc.target/i386/avx512f-vpmullq-2.c
Normal file
45
gcc/testsuite/gcc.target/i386/avx512f-vpmullq-2.c
Normal file
@ -0,0 +1,45 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -mavx512dq" } */
|
||||
/* { dg-require-effective-target avx512dq } */
|
||||
|
||||
#define AVX512DQ
|
||||
#include "avx512f-helper.h"
|
||||
|
||||
#define SIZE (AVX512F_LEN / 64)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
||||
void
|
||||
CALC (long long *src1, long long *src2, long long *dst)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
dst[i] = src1[i] * src2[i];
|
||||
}
|
||||
|
||||
void
|
||||
TEST (void)
|
||||
{
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2, dst1, dst2;
|
||||
long long dst_ref[SIZE];
|
||||
int i;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
{
|
||||
src1.a[i] = i + 50;
|
||||
src2.a[i] = i + 100;
|
||||
dst2.a[i] = DEFAULT_VALUE;
|
||||
}
|
||||
|
||||
dst1.x = INTRINSIC (_mullox_epi64) (src1.x, src2.x);
|
||||
dst2.x = INTRINSIC (_mask_mullox_epi64) (dst2.x, mask, src1.x, src2.x);
|
||||
CALC (src1.a, src2.a, dst_ref);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (dst1, dst_ref))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_q) (dst_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (dst2, dst_ref))
|
||||
abort ();
|
||||
}
|
Loading…
Reference in New Issue
Block a user