gcc/
PR target/61878 * config/i386/avx512fintrin.h (_mm512_mask_cmpge_epi32_mask): New. (_mm512_mask_cmpge_epu32_mask): Ditto. (_mm512_cmpge_epu32_mask): Ditto. (_mm512_mask_cmpge_epi64_mask): Ditto. (_mm512_cmpge_epi64_mask): Ditto. (_mm512_mask_cmpge_epu64_mask): Ditto. (_mm512_cmpge_epu64_mask): Ditto. (_mm512_mask_cmple_epi32_mask): Ditto. (_mm512_cmple_epi32_mask): Ditto. (_mm512_mask_cmple_epu32_mask): Ditto. (_mm512_cmple_epu32_mask): Ditto. (_mm512_mask_cmple_epi64_mask): Ditto. (_mm512_cmple_epi64_mask): Ditto. (_mm512_mask_cmple_epu64_mask): Ditto. (_mm512_cmple_epu64_mask): Ditto. (_mm512_mask_cmplt_epi32_mask): Ditto. (_mm512_cmplt_epi32_mask): Ditto. (_mm512_mask_cmplt_epu32_mask): Ditto. (_mm512_cmplt_epu32_mask): Ditto. (_mm512_mask_cmplt_epi64_mask): Ditto. (_mm512_cmplt_epi64_mask): Ditto. (_mm512_mask_cmplt_epu64_mask): Ditto. (_mm512_cmplt_epu64_mask): Ditto. (_mm512_mask_cmpneq_epi32_mask): Ditto. (_mm512_mask_cmpneq_epu32_mask): Ditto. (_mm512_cmpneq_epu32_mask): Ditto. (_mm512_mask_cmpneq_epi64_mask): Ditto. (_mm512_cmpneq_epi64_mask): Ditto. (_mm512_mask_cmpneq_epu64_mask): Ditto. (_mm512_cmpneq_epu64_mask): Ditto. (_mm512_castpd_ps): Ditto. (_mm512_castpd_si512): Ditto. (_mm512_castps_pd): Ditto. (_mm512_castps_si512): Ditto. (_mm512_castsi512_ps): Ditto. (_mm512_castsi512_pd): Ditto. (_mm512_castpd512_pd128): Ditto. (_mm512_castps512_ps128): Ditto. (_mm512_castsi512_si128): Ditto. (_mm512_castpd512_pd256): Ditto. (_mm512_castps512_ps256): Ditto. (_mm512_castsi512_si256): Ditto. (_mm512_castpd128_pd512): Ditto. (_mm512_castps128_ps512): Ditto. (_mm512_castsi128_si512): Ditto. (_mm512_castpd256_pd512): Ditto. (_mm512_castps256_ps512): Ditto. (_mm512_castsi256_si512): Ditto. (_mm512_cmpeq_epu32_mask): Ditto. (_mm512_mask_cmpeq_epu32_mask): Ditto. (_mm512_mask_cmpeq_epu64_mask): Ditto. (_mm512_cmpeq_epu64_mask): Ditto. (_mm512_cmpgt_epu32_mask): Ditto. (_mm512_mask_cmpgt_epu32_mask): Ditto. (_mm512_mask_cmpgt_epu64_mask): Ditto. (_mm512_cmpgt_epu64_mask): Ditto. * config/i386/i386-builtin-types.def: Add V16SF_FTYPE_V8SF, V16SI_FTYPE_V8SI, V16SI_FTYPE_V4SI, V8DF_FTYPE_V2DF. * config/i386/i386.c (enum ix86_builtins): Add IX86_BUILTIN_SI512_SI256, IX86_BUILTIN_PD512_PD256, IX86_BUILTIN_PS512_PS256, IX86_BUILTIN_SI512_SI, IX86_BUILTIN_PD512_PD, IX86_BUILTIN_PS512_PS. (bdesc_args): Add __builtin_ia32_si512_256si, __builtin_ia32_ps512_256ps, __builtin_ia32_pd512_256pd, __builtin_ia32_si512_si, __builtin_ia32_ps512_ps, __builtin_ia32_pd512_pd. (ix86_expand_args_builtin): Handle new FTYPEs. * config/i386/sse.md (castmode): Add 512-bit modes. (AVX512MODE2P): New. (avx512f_<castmode><avxsizesuffix>_<castmode): New. (avx512f_<castmode><avxsizesuffix>_256<castmode): Ditto. gcc/testsuite/ PR target/61878 * gcc.target/i386/avx512f-typecast-1.c: New test. * gcc.target/i386/avx512f-vpcmpequd-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpequd-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpequq-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpequq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpged-1.c: Add new intrinsic. * gcc.target/i386/avx512f-vpcmpged-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpgeq-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpgeq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpgeud-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpgeud-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpgeuq-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpgeuq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpgtud-1.c: New test. * gcc.target/i386/avx512f-vpcmpgtud-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpgtuq-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpgtuq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpled-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpled-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpleq-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpleq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpleud-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpleud-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpleuq-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpleuq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpltd-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpltd-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpltq-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpltq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpltud-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpltud-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpltuq-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpltuq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpneqd-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpneqd-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpneqq-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpneqq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpnequd-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpnequd-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpnequq-1.c: Ditto. * gcc.target/i386/avx512f-vpcmpnequq-2.c: Ditto. From-SVN: r214019
This commit is contained in:
parent
f613bc0fbe
commit
275be1dac2
47 changed files with 1079 additions and 33 deletions
|
@ -1,3 +1,78 @@
|
|||
2014-08-15 Ilya Tocar <tocarip@gmail.com>
|
||||
|
||||
PR target/61878
|
||||
* config/i386/avx512fintrin.h (_mm512_mask_cmpge_epi32_mask): New.
|
||||
(_mm512_mask_cmpge_epu32_mask): Ditto.
|
||||
(_mm512_cmpge_epu32_mask): Ditto.
|
||||
(_mm512_mask_cmpge_epi64_mask): Ditto.
|
||||
(_mm512_cmpge_epi64_mask): Ditto.
|
||||
(_mm512_mask_cmpge_epu64_mask): Ditto.
|
||||
(_mm512_cmpge_epu64_mask): Ditto.
|
||||
(_mm512_mask_cmple_epi32_mask): Ditto.
|
||||
(_mm512_cmple_epi32_mask): Ditto.
|
||||
(_mm512_mask_cmple_epu32_mask): Ditto.
|
||||
(_mm512_cmple_epu32_mask): Ditto.
|
||||
(_mm512_mask_cmple_epi64_mask): Ditto.
|
||||
(_mm512_cmple_epi64_mask): Ditto.
|
||||
(_mm512_mask_cmple_epu64_mask): Ditto.
|
||||
(_mm512_cmple_epu64_mask): Ditto.
|
||||
(_mm512_mask_cmplt_epi32_mask): Ditto.
|
||||
(_mm512_cmplt_epi32_mask): Ditto.
|
||||
(_mm512_mask_cmplt_epu32_mask): Ditto.
|
||||
(_mm512_cmplt_epu32_mask): Ditto.
|
||||
(_mm512_mask_cmplt_epi64_mask): Ditto.
|
||||
(_mm512_cmplt_epi64_mask): Ditto.
|
||||
(_mm512_mask_cmplt_epu64_mask): Ditto.
|
||||
(_mm512_cmplt_epu64_mask): Ditto.
|
||||
(_mm512_mask_cmpneq_epi32_mask): Ditto.
|
||||
(_mm512_mask_cmpneq_epu32_mask): Ditto.
|
||||
(_mm512_cmpneq_epu32_mask): Ditto.
|
||||
(_mm512_mask_cmpneq_epi64_mask): Ditto.
|
||||
(_mm512_cmpneq_epi64_mask): Ditto.
|
||||
(_mm512_mask_cmpneq_epu64_mask): Ditto.
|
||||
(_mm512_cmpneq_epu64_mask): Ditto.
|
||||
(_mm512_castpd_ps): Ditto.
|
||||
(_mm512_castpd_si512): Ditto.
|
||||
(_mm512_castps_pd): Ditto.
|
||||
(_mm512_castps_si512): Ditto.
|
||||
(_mm512_castsi512_ps): Ditto.
|
||||
(_mm512_castsi512_pd): Ditto.
|
||||
(_mm512_castpd512_pd128): Ditto.
|
||||
(_mm512_castps512_ps128): Ditto.
|
||||
(_mm512_castsi512_si128): Ditto.
|
||||
(_mm512_castpd512_pd256): Ditto.
|
||||
(_mm512_castps512_ps256): Ditto.
|
||||
(_mm512_castsi512_si256): Ditto.
|
||||
(_mm512_castpd128_pd512): Ditto.
|
||||
(_mm512_castps128_ps512): Ditto.
|
||||
(_mm512_castsi128_si512): Ditto.
|
||||
(_mm512_castpd256_pd512): Ditto.
|
||||
(_mm512_castps256_ps512): Ditto.
|
||||
(_mm512_castsi256_si512): Ditto.
|
||||
(_mm512_cmpeq_epu32_mask): Ditto.
|
||||
(_mm512_mask_cmpeq_epu32_mask): Ditto.
|
||||
(_mm512_mask_cmpeq_epu64_mask): Ditto.
|
||||
(_mm512_cmpeq_epu64_mask): Ditto.
|
||||
(_mm512_cmpgt_epu32_mask): Ditto.
|
||||
(_mm512_mask_cmpgt_epu32_mask): Ditto.
|
||||
(_mm512_mask_cmpgt_epu64_mask): Ditto.
|
||||
(_mm512_cmpgt_epu64_mask): Ditto.
|
||||
* config/i386/i386-builtin-types.def: Add V16SF_FTYPE_V8SF,
|
||||
V16SI_FTYPE_V8SI, V16SI_FTYPE_V4SI, V8DF_FTYPE_V2DF.
|
||||
* config/i386/i386.c (enum ix86_builtins): Add
|
||||
IX86_BUILTIN_SI512_SI256, IX86_BUILTIN_PD512_PD256,
|
||||
IX86_BUILTIN_PS512_PS256, IX86_BUILTIN_SI512_SI,
|
||||
IX86_BUILTIN_PD512_PD, IX86_BUILTIN_PS512_PS.
|
||||
(bdesc_args): Add __builtin_ia32_si512_256si,
|
||||
__builtin_ia32_ps512_256ps, __builtin_ia32_pd512_256pd,
|
||||
__builtin_ia32_si512_si, __builtin_ia32_ps512_ps,
|
||||
__builtin_ia32_pd512_pd.
|
||||
(ix86_expand_args_builtin): Handle new FTYPEs.
|
||||
* config/i386/sse.md (castmode): Add 512-bit modes.
|
||||
(AVX512MODE2P): New.
|
||||
(avx512f_<castmode><avxsizesuffix>_<castmode): New.
|
||||
(avx512f_<castmode><avxsizesuffix>_256<castmode): Ditto.
|
||||
|
||||
2014-08-15 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* fold-const.c (tree_swap_operands_p): Put all constants
|
||||
|
|
|
@ -8751,6 +8751,24 @@ _mm512_cmpge_epi32_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpge_epi32_mask (__mmask16 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_cmpd512_mask ((__v16si) __X,
|
||||
(__v16si) __Y, 5,
|
||||
(__mmask16) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpge_epu32_mask (__mmask16 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __X,
|
||||
(__v16si) __Y, 5,
|
||||
(__mmask16) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmpge_epu32_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8760,6 +8778,15 @@ _mm512_cmpge_epu32_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpge_epi64_mask (__mmask8 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_cmpq512_mask ((__v8di) __X,
|
||||
(__v8di) __Y, 5,
|
||||
(__mmask8) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmpge_epi64_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8769,6 +8796,15 @@ _mm512_cmpge_epi64_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpge_epu64_mask (__mmask8 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __X,
|
||||
(__v8di) __Y, 5,
|
||||
(__mmask8) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmpge_epu64_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8778,6 +8814,15 @@ _mm512_cmpge_epu64_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmple_epi32_mask (__mmask16 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_cmpd512_mask ((__v16si) __X,
|
||||
(__v16si) __Y, 2,
|
||||
(__mmask16) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmple_epi32_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8787,6 +8832,15 @@ _mm512_cmple_epi32_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmple_epu32_mask (__mmask16 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __X,
|
||||
(__v16si) __Y, 2,
|
||||
(__mmask16) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmple_epu32_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8796,6 +8850,15 @@ _mm512_cmple_epu32_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmple_epi64_mask (__mmask8 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_cmpq512_mask ((__v8di) __X,
|
||||
(__v8di) __Y, 2,
|
||||
(__mmask8) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmple_epi64_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8805,6 +8868,15 @@ _mm512_cmple_epi64_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmple_epu64_mask (__mmask8 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __X,
|
||||
(__v8di) __Y, 2,
|
||||
(__mmask8) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmple_epu64_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8814,6 +8886,15 @@ _mm512_cmple_epu64_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmplt_epi32_mask (__mmask16 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_cmpd512_mask ((__v16si) __X,
|
||||
(__v16si) __Y, 1,
|
||||
(__mmask16) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmplt_epi32_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8823,6 +8904,15 @@ _mm512_cmplt_epi32_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmplt_epu32_mask (__mmask16 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __X,
|
||||
(__v16si) __Y, 1,
|
||||
(__mmask16) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmplt_epu32_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8832,6 +8922,15 @@ _mm512_cmplt_epu32_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmplt_epi64_mask (__mmask8 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_cmpq512_mask ((__v8di) __X,
|
||||
(__v8di) __Y, 1,
|
||||
(__mmask8) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmplt_epi64_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8841,6 +8940,15 @@ _mm512_cmplt_epi64_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmplt_epu64_mask (__mmask8 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __X,
|
||||
(__v8di) __Y, 1,
|
||||
(__mmask8) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmplt_epu64_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8859,6 +8967,24 @@ _mm512_cmpneq_epi32_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpneq_epi32_mask (__mmask16 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_cmpd512_mask ((__v16si) __X,
|
||||
(__v16si) __Y, 4,
|
||||
(__mmask16) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpneq_epu32_mask (__mmask16 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __X,
|
||||
(__v16si) __Y, 4,
|
||||
(__mmask16) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmpneq_epu32_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8868,6 +8994,15 @@ _mm512_cmpneq_epu32_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpneq_epi64_mask (__mmask16 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_cmpq512_mask ((__v8di) __X,
|
||||
(__v8di) __Y, 4,
|
||||
(__mmask8) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmpneq_epi64_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -8877,6 +9012,15 @@ _mm512_cmpneq_epi64_mask (__m512i __X, __m512i __Y)
|
|||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpneq_epu64_mask (__mmask8 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __X,
|
||||
(__v8di) __Y, 4,
|
||||
(__mmask8) __M);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmpneq_epu64_mask (__m512i __X, __m512i __Y)
|
||||
|
@ -12907,6 +13051,200 @@ _mm512_kmov (__mmask16 __A)
|
|||
return __builtin_ia32_kmov16 (__A);
|
||||
}
|
||||
|
||||
extern __inline __m512
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castpd_ps (__m512d __A)
|
||||
{
|
||||
return (__m512) (__A);
|
||||
}
|
||||
|
||||
extern __inline __m512i
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castpd_si512 (__m512d __A)
|
||||
{
|
||||
return (__m512i) (__A);
|
||||
}
|
||||
|
||||
extern __inline __m512d
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castps_pd (__m512 __A)
|
||||
{
|
||||
return (__m512d) (__A);
|
||||
}
|
||||
|
||||
extern __inline __m512i
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castps_si512 (__m512 __A)
|
||||
{
|
||||
return (__m512i) (__A);
|
||||
}
|
||||
|
||||
extern __inline __m512
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castsi512_ps (__m512i __A)
|
||||
{
|
||||
return (__m512) (__A);
|
||||
}
|
||||
|
||||
extern __inline __m512d
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castsi512_pd (__m512i __A)
|
||||
{
|
||||
return (__m512d) (__A);
|
||||
}
|
||||
|
||||
extern __inline __m128d
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castpd512_pd128 (__m512d __A)
|
||||
{
|
||||
return (__m128d)_mm512_extractf32x4_ps((__m512)__A, 0);
|
||||
}
|
||||
|
||||
extern __inline __m128
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castps512_ps128 (__m512 __A)
|
||||
{
|
||||
return _mm512_extractf32x4_ps(__A, 0);
|
||||
}
|
||||
|
||||
extern __inline __m128i
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castsi512_si128 (__m512i __A)
|
||||
{
|
||||
return (__m128i)_mm512_extracti32x4_epi32((__m512i)__A, 0);
|
||||
}
|
||||
|
||||
extern __inline __m256d
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castpd512_pd256 (__m512d __A)
|
||||
{
|
||||
return _mm512_extractf64x4_pd(__A, 0);
|
||||
}
|
||||
|
||||
extern __inline __m256
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castps512_ps256 (__m512 __A)
|
||||
{
|
||||
return (__m256)_mm512_extractf64x4_pd((__m512d)__A, 0);
|
||||
}
|
||||
|
||||
extern __inline __m256i
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castsi512_si256 (__m512i __A)
|
||||
{
|
||||
return (__m256i)_mm512_extractf64x4_pd((__m512d)__A, 0);
|
||||
}
|
||||
|
||||
extern __inline __m512d
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castpd128_pd512 (__m128d __A)
|
||||
{
|
||||
return (__m512d) __builtin_ia32_pd512_pd((__m128d)__A);
|
||||
}
|
||||
|
||||
extern __inline __m512
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castps128_ps512 (__m128 __A)
|
||||
{
|
||||
return (__m512) __builtin_ia32_ps512_ps((__m128)__A);
|
||||
}
|
||||
|
||||
extern __inline __m512i
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castsi128_si512 (__m128i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_si512_si((__v4si)__A);
|
||||
}
|
||||
|
||||
extern __inline __m512d
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castpd256_pd512 (__m256d __A)
|
||||
{
|
||||
return __builtin_ia32_pd512_256pd (__A);
|
||||
}
|
||||
|
||||
extern __inline __m512
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castps256_ps512 (__m256 __A)
|
||||
{
|
||||
return __builtin_ia32_ps512_256ps (__A);
|
||||
}
|
||||
|
||||
extern __inline __m512i
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_castsi256_si512 (__m256i __A)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_si512_256si ((__v8si)__A);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmpeq_epu32_mask (__m512i __A, __m512i __B)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __A,
|
||||
(__v16si) __B, 0,
|
||||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpeq_epu32_mask (__mmask16 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __A,
|
||||
(__v16si) __B, 0, __U);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpeq_epu64_mask (__mmask8 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __A,
|
||||
(__v8di) __B, 0, __U);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmpeq_epu64_mask (__m512i __A, __m512i __B)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __A,
|
||||
(__v8di) __B, 0,
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmpgt_epu32_mask (__m512i __A, __m512i __B)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __A,
|
||||
(__v16si) __B, 6,
|
||||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
extern __inline __mmask16
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpgt_epu32_mask (__mmask16 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __A,
|
||||
(__v16si) __B, 6, __U);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_mask_cmpgt_epu64_mask (__mmask8 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __A,
|
||||
(__v8di) __B, 6, __U);
|
||||
}
|
||||
|
||||
extern __inline __mmask8
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_mm512_cmpgt_epu64_mask (__m512i __A, __m512i __B)
|
||||
{
|
||||
return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __A,
|
||||
(__v8di) __B, 6,
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
#ifdef __DISABLE_AVX512F__
|
||||
#undef __DISABLE_AVX512F__
|
||||
#pragma GCC pop_options
|
||||
|
|
|
@ -273,7 +273,9 @@ DEF_FUNCTION_TYPE (V16SI, INT)
|
|||
DEF_FUNCTION_TYPE (V8DF, DOUBLE)
|
||||
DEF_FUNCTION_TYPE (V8DI, INT64)
|
||||
DEF_FUNCTION_TYPE (V16SF, V4SF)
|
||||
DEF_FUNCTION_TYPE (V16SF, V8SF)
|
||||
DEF_FUNCTION_TYPE (V8DF, V4DF)
|
||||
DEF_FUNCTION_TYPE (V8DF, V2DF)
|
||||
DEF_FUNCTION_TYPE (V8DI, V4DI)
|
||||
DEF_FUNCTION_TYPE (V16QI, V8DI)
|
||||
DEF_FUNCTION_TYPE (UINT, V4SF)
|
||||
|
@ -281,6 +283,8 @@ DEF_FUNCTION_TYPE (UINT64, V4SF)
|
|||
DEF_FUNCTION_TYPE (UINT, V2DF)
|
||||
DEF_FUNCTION_TYPE (UINT64, V2DF)
|
||||
DEF_FUNCTION_TYPE (V16SI, V16SI)
|
||||
DEF_FUNCTION_TYPE (V16SI, V4SI)
|
||||
DEF_FUNCTION_TYPE (V16SI, V8SI)
|
||||
DEF_FUNCTION_TYPE (V16SI, V16SI, V16SI, HI)
|
||||
DEF_FUNCTION_TYPE (V8DI, V8DI)
|
||||
DEF_FUNCTION_TYPE (V8DI, V8DI, V8DI, QI)
|
||||
|
|
|
@ -28121,6 +28121,12 @@ enum ix86_builtins
|
|||
IX86_BUILTIN_GATHERDIV8SI,
|
||||
|
||||
/* AVX512F */
|
||||
IX86_BUILTIN_SI512_SI256,
|
||||
IX86_BUILTIN_PD512_PD256,
|
||||
IX86_BUILTIN_PS512_PS256,
|
||||
IX86_BUILTIN_SI512_SI,
|
||||
IX86_BUILTIN_PD512_PD,
|
||||
IX86_BUILTIN_PS512_PS,
|
||||
IX86_BUILTIN_ADDPD512,
|
||||
IX86_BUILTIN_ADDPS512,
|
||||
IX86_BUILTIN_ADDSD_ROUND,
|
||||
|
@ -30018,6 +30024,12 @@ static const struct builtin_description bdesc_args[] =
|
|||
{ OPTION_MASK_ISA_BMI2, CODE_FOR_bmi2_pext_di3, "__builtin_ia32_pext_di", IX86_BUILTIN_PEXT64, UNKNOWN, (int) UINT64_FTYPE_UINT64_UINT64 },
|
||||
|
||||
/* AVX512F */
|
||||
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_si512_256si, "__builtin_ia32_si512_256si", IX86_BUILTIN_SI512_SI256, UNKNOWN, (int) V16SI_FTYPE_V8SI },
|
||||
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_ps512_256ps, "__builtin_ia32_ps512_256ps", IX86_BUILTIN_PS512_PS256, UNKNOWN, (int) V16SF_FTYPE_V8SF },
|
||||
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_pd512_256pd, "__builtin_ia32_pd512_256pd", IX86_BUILTIN_PD512_PD256, UNKNOWN, (int) V8DF_FTYPE_V4DF },
|
||||
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_si512_si, "__builtin_ia32_si512_si", IX86_BUILTIN_SI512_SI, UNKNOWN, (int) V16SI_FTYPE_V4SI },
|
||||
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_ps512_ps, "__builtin_ia32_ps512_ps", IX86_BUILTIN_PS512_PS, UNKNOWN, (int) V16SF_FTYPE_V4SF },
|
||||
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_pd512_pd, "__builtin_ia32_pd512_pd", IX86_BUILTIN_PD512_PD, UNKNOWN, (int) V8DF_FTYPE_V2DF },
|
||||
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_alignv16si_mask, "__builtin_ia32_alignd512_mask", IX86_BUILTIN_ALIGND512, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_INT_V16SI_HI },
|
||||
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_alignv8di_mask, "__builtin_ia32_alignq512_mask", IX86_BUILTIN_ALIGNQ512, UNKNOWN, (int) V8DI_FTYPE_V8DI_V8DI_INT_V8DI_QI },
|
||||
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_blendmv16si, "__builtin_ia32_blendmd_512_mask", IX86_BUILTIN_BLENDMD512, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_HI },
|
||||
|
@ -33655,7 +33667,10 @@ ix86_expand_args_builtin (const struct builtin_description *d,
|
|||
case V16SI_FTYPE_V16SI:
|
||||
case V16SI_FTYPE_INT:
|
||||
case V16SF_FTYPE_FLOAT:
|
||||
case V16SF_FTYPE_V8SF:
|
||||
case V16SI_FTYPE_V8SI:
|
||||
case V16SF_FTYPE_V4SF:
|
||||
case V16SI_FTYPE_V4SI:
|
||||
case V16SF_FTYPE_V16SF:
|
||||
case V8HI_FTYPE_V8DI:
|
||||
case V8UHI_FTYPE_V8UHI:
|
||||
|
@ -33668,6 +33683,7 @@ ix86_expand_args_builtin (const struct builtin_description *d,
|
|||
case V8DI_FTYPE_V8DI:
|
||||
case V8DF_FTYPE_DOUBLE:
|
||||
case V8DF_FTYPE_V4DF:
|
||||
case V8DF_FTYPE_V2DF:
|
||||
case V8DF_FTYPE_V8DF:
|
||||
case V8DF_FTYPE_V8SI:
|
||||
nargs = 1;
|
||||
|
|
|
@ -637,7 +637,9 @@
|
|||
[(V16QI "7") (V8HI "15") (V4SI "31") (V2DI "63")])
|
||||
|
||||
;; Mapping of mode to cast intrinsic name
|
||||
(define_mode_attr castmode [(V8SI "si") (V8SF "ps") (V4DF "pd")])
|
||||
(define_mode_attr castmode
|
||||
[(V8SI "si") (V8SF "ps") (V4DF "pd")
|
||||
(V16SI "si") (V16SF "ps") (V8DF "pd")])
|
||||
|
||||
;; Instruction suffix for sign and zero extensions.
|
||||
(define_code_attr extsuffix [(sign_extend "sx") (zero_extend "zx")])
|
||||
|
@ -651,6 +653,7 @@
|
|||
|
||||
;; Mix-n-match
|
||||
(define_mode_iterator AVX256MODE2P [V8SI V8SF V4DF])
|
||||
(define_mode_iterator AVX512MODE2P [V16SI V16SF V8DF])
|
||||
|
||||
;; Mapping for dbpsabbw modes
|
||||
(define_mode_attr dbpsadbwmode
|
||||
|
@ -15717,3 +15720,43 @@
|
|||
[(set_attr "type" "sselog1")
|
||||
(set_attr "length_immediate" "1")
|
||||
(set_attr "mode" "TI")])
|
||||
|
||||
(define_insn_and_split "avx512f_<castmode><avxsizesuffix>_<castmode>"
|
||||
[(set (match_operand:AVX512MODE2P 0 "nonimmediate_operand" "=x,m")
|
||||
(unspec:AVX512MODE2P
|
||||
[(match_operand:<ssequartermode> 1 "nonimmediate_operand" "xm,x")]
|
||||
UNSPEC_CAST))]
|
||||
"TARGET_AVX512F"
|
||||
"#"
|
||||
"&& reload_completed"
|
||||
[(const_int 0)]
|
||||
{
|
||||
rtx op0 = operands[0];
|
||||
rtx op1 = operands[1];
|
||||
if (REG_P (op0))
|
||||
op0 = gen_rtx_REG (<ssequartermode>mode, REGNO (op0));
|
||||
else
|
||||
op1 = gen_rtx_REG (<MODE>mode, REGNO (op1));
|
||||
emit_move_insn (op0, op1);
|
||||
DONE;
|
||||
})
|
||||
|
||||
(define_insn_and_split "avx512f_<castmode><avxsizesuffix>_256<castmode>"
|
||||
[(set (match_operand:AVX512MODE2P 0 "nonimmediate_operand" "=x,m")
|
||||
(unspec:AVX512MODE2P
|
||||
[(match_operand:<ssehalfvecmode> 1 "nonimmediate_operand" "xm,x")]
|
||||
UNSPEC_CAST))]
|
||||
"TARGET_AVX512F"
|
||||
"#"
|
||||
"&& reload_completed"
|
||||
[(const_int 0)]
|
||||
{
|
||||
rtx op0 = operands[0];
|
||||
rtx op1 = operands[1];
|
||||
if (REG_P (op0))
|
||||
op0 = gen_rtx_REG (<ssehalfvecmode>mode, REGNO (op0));
|
||||
else
|
||||
op1 = gen_rtx_REG (<MODE>mode, REGNO (op1));
|
||||
emit_move_insn (op0, op1);
|
||||
DONE;
|
||||
})
|
||||
|
|
|
@ -1,3 +1,48 @@
|
|||
2014-08-15 Ilya Tocar <tocarip@gmail.com>
|
||||
|
||||
PR target/61878
|
||||
* gcc.target/i386/avx512f-typecast-1.c: New test.
|
||||
* gcc.target/i386/avx512f-vpcmpequd-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpequd-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpequq-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpequq-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpged-1.c: Add new intrinsic.
|
||||
* gcc.target/i386/avx512f-vpcmpged-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpgeq-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpgeq-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpgeud-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpgeud-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpgeuq-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpgeuq-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpgtud-1.c: New test.
|
||||
* gcc.target/i386/avx512f-vpcmpgtud-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpgtuq-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpgtuq-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpled-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpled-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpleq-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpleq-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpleud-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpleud-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpleuq-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpleuq-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpltd-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpltd-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpltq-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpltq-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpltud-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpltud-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpltuq-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpltuq-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpneqd-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpneqd-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpneqq-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpneqq-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpnequd-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpnequd-2.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpnequq-1.c: Ditto.
|
||||
* gcc.target/i386/avx512f-vpcmpnequq-2.c: Ditto.
|
||||
|
||||
2014-08-15 Jakub Jelinek <jakub@redhat.com>
|
||||
Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
|
|
118
gcc/testsuite/gcc.target/i386/avx512f-typecast-1.c
Normal file
118
gcc/testsuite/gcc.target/i386/avx512f-typecast-1.c
Normal file
|
@ -0,0 +1,118 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -mavx512f" } */
|
||||
/* { dg-require-effective-target avx512f } */
|
||||
|
||||
#include "avx512f-check.h"
|
||||
|
||||
|
||||
void
|
||||
avx512f_test (void)
|
||||
{
|
||||
union512i_d a, ad;
|
||||
union512 b, bd;
|
||||
union512d c, cd;
|
||||
union256i_d d, dd;
|
||||
union256 e, ed;
|
||||
union256d f, fd;
|
||||
union128i_d g, gd;
|
||||
union128 h, hd;
|
||||
union128d k, kd;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
a.a[i] = 7146908634 + i;
|
||||
b.a[i] = 45.12f + i;
|
||||
}
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
c.a[i] = 41234512513451345.0905 + i;
|
||||
d.a[i] = 109534 + i;
|
||||
e.a[i] = 85034.095f + i;
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
f.a[i] = 41234512451345.0905 + i;
|
||||
g.a[i] = 71469086341 + i;
|
||||
h.a[i] = 45.1264f + i;
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
k.a[i] = 7146908634.576 + i;
|
||||
}
|
||||
|
||||
bd.x = _mm512_castpd_ps (c.x);
|
||||
if (memcmp(bd.a, c.a, 64))
|
||||
abort ();
|
||||
|
||||
ad.x = _mm512_castpd_si512 (c.x);
|
||||
if (memcmp(ad.a, c.a, 64))
|
||||
abort ();
|
||||
|
||||
cd.x = _mm512_castps_pd (b.x);
|
||||
if (memcmp(cd.a, b.a, 64))
|
||||
abort ();
|
||||
|
||||
ad.x = _mm512_castps_si512 (b.x);
|
||||
if (memcmp(ad.a, b.a, 64))
|
||||
abort ();
|
||||
|
||||
bd.x = _mm512_castsi512_ps (a.x);
|
||||
if (memcmp(bd.a, a.a, 64))
|
||||
abort ();
|
||||
|
||||
cd.x = _mm512_castsi512_pd (a.x);
|
||||
if (memcmp(cd.a, a.a, 64))
|
||||
abort ();
|
||||
|
||||
kd.x = _mm512_castpd512_pd128 (c.x);
|
||||
if (memcmp(kd.a, c.a, 16))
|
||||
abort ();
|
||||
|
||||
hd.x = _mm512_castps512_ps128 (b.x);
|
||||
if (memcmp(hd.a, b.a, 16))
|
||||
abort ();
|
||||
|
||||
gd.x = _mm512_castsi512_si128 (a.x);
|
||||
if (memcmp(gd.a, a.a, 16))
|
||||
abort ();
|
||||
|
||||
fd.x = _mm512_castpd512_pd256 (c.x);
|
||||
if (memcmp(fd.a, c.a, 32))
|
||||
abort ();
|
||||
|
||||
ed.x = _mm512_castps512_ps256 (b.x);
|
||||
if (memcmp(ed.a, b.a, 32))
|
||||
abort ();
|
||||
|
||||
dd.x = _mm512_castsi512_si256 (a.x);
|
||||
if (memcmp(dd.a, a.a, 32))
|
||||
abort ();
|
||||
|
||||
cd.x = _mm512_castpd128_pd512 (k.x);
|
||||
if (memcmp(cd.a, k.a, 16))
|
||||
abort ();
|
||||
|
||||
bd.x = _mm512_castps128_ps512 (h.x);
|
||||
if (memcmp(bd.a, h.a, 16))
|
||||
abort ();
|
||||
|
||||
ad.x = _mm512_castsi128_si512 (g.x);
|
||||
if (memcmp(ad.a, g.a, 16))
|
||||
abort ();
|
||||
|
||||
cd.x = _mm512_castpd256_pd512 (f.x);
|
||||
if (memcmp(cd.a, f.a, 32))
|
||||
abort ();
|
||||
|
||||
bd.x = _mm512_castps256_ps512 (e.x);
|
||||
if (memcmp(bd.a, e.a, 32))
|
||||
abort ();
|
||||
|
||||
ad.x = _mm512_castsi256_si512 (d.x);
|
||||
if (memcmp(ad.a, d.a, 32))
|
||||
abort ();
|
||||
}
|
16
gcc/testsuite/gcc.target/i386/avx512f-vpcmpequd-1.c
Normal file
16
gcc/testsuite/gcc.target/i386/avx512f-vpcmpequd-1.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
volatile __m512i x;
|
||||
volatile __mmask16 m;
|
||||
|
||||
void extern
|
||||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpeq_epu32_mask (x, x);
|
||||
m = _mm512_mask_cmpeq_epu32_mask (3, x, x);
|
||||
}
|
54
gcc/testsuite/gcc.target/i386/avx512f-vpcmpequd-2.c
Normal file
54
gcc/testsuite/gcc.target/i386/avx512f-vpcmpequd-2.c
Normal file
|
@ -0,0 +1,54 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -mavx512f" } */
|
||||
/* { dg-require-effective-target avx512f } */
|
||||
|
||||
#define AVX512F
|
||||
|
||||
#include "avx512f-helper.h"
|
||||
|
||||
#define SIZE (AVX512F_LEN / 32)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
||||
static void
|
||||
CALC (MASK_TYPE *r, unsigned int *s1, unsigned int *s2)
|
||||
{
|
||||
int i;
|
||||
*r = 0;
|
||||
MASK_TYPE one = 1;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
if (s1[i] == s2[i])
|
||||
*r = *r | (one << i);
|
||||
}
|
||||
|
||||
void
|
||||
TEST (void)
|
||||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
|
||||
MASK_TYPE res_ref, res1, res2;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
res1 = 0;
|
||||
res2 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
{
|
||||
src1.a[i * 2] = i;
|
||||
src1.a[i * 2 + 1] = i * i;
|
||||
src2.a[i * 2] = 2 * i;
|
||||
src2.a[i * 2 + 1] = i * i;
|
||||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpeq_epu32_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpeq_epu32_mask) (mask, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res_ref != res1)
|
||||
abort ();
|
||||
|
||||
res_ref &= mask;
|
||||
|
||||
if (res_ref != res2)
|
||||
abort ();
|
||||
}
|
16
gcc/testsuite/gcc.target/i386/avx512f-vpcmpequq-1.c
Normal file
16
gcc/testsuite/gcc.target/i386/avx512f-vpcmpequq-1.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
volatile __m512i x;
|
||||
volatile __mmask8 m;
|
||||
|
||||
void extern
|
||||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpeq_epu64_mask (x, x);
|
||||
m = _mm512_mask_cmpeq_epu64_mask (3, x, x);
|
||||
}
|
54
gcc/testsuite/gcc.target/i386/avx512f-vpcmpequq-2.c
Normal file
54
gcc/testsuite/gcc.target/i386/avx512f-vpcmpequq-2.c
Normal file
|
@ -0,0 +1,54 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -mavx512f" } */
|
||||
/* { dg-require-effective-target avx512f } */
|
||||
|
||||
#define AVX512F
|
||||
|
||||
#include "avx512f-helper.h"
|
||||
|
||||
#define SIZE (AVX512F_LEN / 64)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
||||
static void
|
||||
CALC (MASK_TYPE *r, unsigned long long *s1, unsigned long long *s2)
|
||||
{
|
||||
int i;
|
||||
*r = 0;
|
||||
MASK_TYPE one = 1;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
if (s1[i] == s2[i])
|
||||
*r = *r | (one << i);
|
||||
}
|
||||
|
||||
void
|
||||
TEST (void)
|
||||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
|
||||
MASK_TYPE res1, res2, res_ref;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
res1 = 0;
|
||||
res2 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
{
|
||||
src1.a[i * 2] = i;
|
||||
src1.a[i * 2 + 1] = i * i;
|
||||
src2.a[i * 2] = 2 * i;
|
||||
src2.a[i * 2 + 1] = i * i;
|
||||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpeq_epu64_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpeq_epu64_mask) (mask, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res1 != res_ref)
|
||||
abort ();
|
||||
|
||||
res_ref &= mask;
|
||||
|
||||
if (res2 != res_ref)
|
||||
abort ();
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpge_epi32_mask (x, x);
|
||||
m = _mm512_mask_cmpge_epi32_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
|
||||
MASK_TYPE res_ref, res1;
|
||||
MASK_TYPE res_ref, res1, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpge_epi32_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpge_epi32_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res_ref != res1)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res_ref != res2)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpge_epi64_mask (x, x);
|
||||
m = _mm512_mask_cmpge_epi64_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
|
||||
MASK_TYPE res1, res_ref;
|
||||
MASK_TYPE res1, res_ref, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpge_epi64_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpge_epi64_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res1 != res_ref)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res2 != res_ref)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpge_epu32_mask (x, x);
|
||||
m = _mm512_mask_cmpge_epu32_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
|
||||
MASK_TYPE res_ref, res1;
|
||||
MASK_TYPE res_ref, res1, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpge_epu32_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpge_epu32_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res_ref != res1)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res_ref != res2)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpge_epu64_mask (x, x);
|
||||
m = _mm512_mask_cmpge_epu64_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
|
||||
MASK_TYPE res1, res_ref;
|
||||
MASK_TYPE res1, res_ref, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpge_epu64_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpge_epu64_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res1 != res_ref)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res2 != res_ref)
|
||||
abort ();
|
||||
}
|
||||
|
|
16
gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtud-1.c
Normal file
16
gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtud-1.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
volatile __m512i x;
|
||||
volatile __mmask16 m;
|
||||
|
||||
void extern
|
||||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpgt_epu32_mask (x, x);
|
||||
m = _mm512_mask_cmpgt_epu32_mask (3, x, x);
|
||||
}
|
54
gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtud-2.c
Normal file
54
gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtud-2.c
Normal file
|
@ -0,0 +1,54 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -mavx512f" } */
|
||||
/* { dg-require-effective-target avx512f } */
|
||||
|
||||
#define AVX512F
|
||||
|
||||
#include "avx512f-helper.h"
|
||||
|
||||
#define SIZE (AVX512F_LEN / 32)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
||||
static void
|
||||
CALC (MASK_TYPE *r, unsigned int *s1, unsigned int *s2)
|
||||
{
|
||||
int i;
|
||||
*r = 0;
|
||||
MASK_TYPE one = 1;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
if (s1[i] > s2[i])
|
||||
*r = *r | (one << i);
|
||||
}
|
||||
|
||||
void
|
||||
TEST (void)
|
||||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
|
||||
MASK_TYPE res_ref, res1, res2;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
res1 = 0;
|
||||
res2 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
{
|
||||
src1.a[i * 2] = i;
|
||||
src1.a[i * 2 + 1] = i * i;
|
||||
src2.a[i * 2] = 2 * i;
|
||||
src2.a[i * 2 + 1] = i * i;
|
||||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpgt_epu32_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpgt_epu32_mask) (mask, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res_ref != res1)
|
||||
abort ();
|
||||
|
||||
res_ref &= mask;
|
||||
|
||||
if (res_ref != res2)
|
||||
abort ();
|
||||
}
|
16
gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtuq-1.c
Normal file
16
gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtuq-1.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
volatile __m512i x;
|
||||
volatile __mmask8 m;
|
||||
|
||||
void extern
|
||||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpgt_epu64_mask (x, x);
|
||||
m = _mm512_mask_cmpgt_epu64_mask (3, x, x);
|
||||
}
|
54
gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtuq-2.c
Normal file
54
gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtuq-2.c
Normal file
|
@ -0,0 +1,54 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -mavx512f" } */
|
||||
/* { dg-require-effective-target avx512f } */
|
||||
|
||||
#define AVX512F
|
||||
|
||||
#include "avx512f-helper.h"
|
||||
|
||||
#define SIZE (AVX512F_LEN / 64)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
||||
static void
|
||||
CALC (MASK_TYPE *r, unsigned long long *s1, unsigned long long *s2)
|
||||
{
|
||||
int i;
|
||||
*r = 0;
|
||||
MASK_TYPE one = 1;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
if (s1[i] > s2[i])
|
||||
*r = *r | (one << i);
|
||||
}
|
||||
|
||||
void
|
||||
TEST (void)
|
||||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
|
||||
MASK_TYPE res1, res2, res_ref;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
res1 = 0;
|
||||
res2 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
{
|
||||
src1.a[i * 2] = i;
|
||||
src1.a[i * 2 + 1] = i * i;
|
||||
src2.a[i * 2] = 2 * i;
|
||||
src2.a[i * 2 + 1] = i * i;
|
||||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpgt_epu64_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpgt_epu64_mask) (mask, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res1 != res_ref)
|
||||
abort ();
|
||||
|
||||
res_ref &= mask;
|
||||
|
||||
if (res2 != res_ref)
|
||||
abort ();
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmple_epi32_mask (x, x);
|
||||
m = _mm512_mask_cmple_epi32_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
|
||||
MASK_TYPE res_ref, res1;
|
||||
MASK_TYPE res_ref, res1, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmple_epi32_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmple_epi32_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res_ref != res1)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res_ref != res2)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmple_epi64_mask (x, x);
|
||||
m = _mm512_mask_cmple_epi64_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
|
||||
MASK_TYPE res1, res_ref;
|
||||
MASK_TYPE res1, res_ref, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmple_epi64_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmple_epi64_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res1 != res_ref)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res2 != res_ref)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmple_epu32_mask (x, x);
|
||||
m = _mm512_mask_cmple_epu32_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
|
||||
MASK_TYPE res_ref, res1;
|
||||
MASK_TYPE res_ref, res1, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmple_epu32_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmple_epu32_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res_ref != res1)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res_ref != res2)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmple_epu64_mask (x, x);
|
||||
m = _mm512_mask_cmple_epu64_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
|
||||
MASK_TYPE res1, res_ref;
|
||||
MASK_TYPE res1, res_ref, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmple_epu64_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmple_epu64_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res1 != res_ref)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res2 != res_ref)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmplt_epi32_mask (x, x);
|
||||
m = _mm512_mask_cmplt_epi32_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
|
||||
MASK_TYPE res_ref, res1;
|
||||
MASK_TYPE res_ref, res1, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmplt_epi32_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmplt_epi32_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res_ref != res1)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res_ref != res2)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmplt_epi64_mask (x, x);
|
||||
m = _mm512_mask_cmplt_epi64_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
|
||||
MASK_TYPE res1, res_ref;
|
||||
MASK_TYPE res1, res_ref, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmplt_epi64_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmplt_epi64_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res1 != res_ref)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res2 != res_ref)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmplt_epu32_mask (x, x);
|
||||
m = _mm512_mask_cmplt_epu32_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
|
||||
MASK_TYPE res_ref, res1;
|
||||
MASK_TYPE res_ref, res1, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmplt_epu32_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmplt_epu32_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res_ref != res1)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res_ref != res2)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmplt_epu64_mask (x, x);
|
||||
m = _mm512_mask_cmplt_epu64_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
|
||||
MASK_TYPE res1, res_ref;
|
||||
MASK_TYPE res1, res_ref, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmplt_epu64_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmplt_epu64_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res1 != res_ref)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res2 != res_ref)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpneq_epi32_mask (x, x);
|
||||
m = _mm512_mask_cmpneq_epi32_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
|
||||
MASK_TYPE res_ref, res1;
|
||||
MASK_TYPE res_ref, res1, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpneq_epi32_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpneq_epi32_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res_ref != res1)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res_ref != res2)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpneq_epi64_mask (x, x);
|
||||
m = _mm512_mask_cmpneq_epi64_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
|
||||
MASK_TYPE res1, res_ref;
|
||||
MASK_TYPE res1, res_ref, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,14 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpneq_epi64_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpneq_epi64_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res1 != res_ref)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
if (res2 != res_ref)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpneq_epu32_mask (x, x);
|
||||
m = _mm512_mask_cmpneq_epu32_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
|
||||
MASK_TYPE res_ref, res1;
|
||||
MASK_TYPE res_ref, res1, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpneq_epu32_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpneq_epu32_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res_ref != res1)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res_ref != res2)
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512f -O2" } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -11,4 +12,5 @@ void extern
|
|||
avx512f_test (void)
|
||||
{
|
||||
m = _mm512_cmpneq_epu64_mask (x, x);
|
||||
m = _mm512_mask_cmpneq_epu64_mask (m, x, x);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST (void)
|
|||
{
|
||||
int i;
|
||||
UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
|
||||
MASK_TYPE res1, res_ref;
|
||||
MASK_TYPE res1, res_ref, res2;
|
||||
res1 = 0;
|
||||
|
||||
for (i = 0; i < SIZE / 2; i++)
|
||||
|
@ -38,9 +38,15 @@ TEST (void)
|
|||
}
|
||||
|
||||
res1 = INTRINSIC (_cmpneq_epu64_mask) (src1.x, src2.x);
|
||||
res2 = INTRINSIC (_mask_cmpneq_epu64_mask) (MASK_VALUE, src1.x, src2.x);
|
||||
|
||||
CALC (&res_ref, src1.a, src2.a);
|
||||
|
||||
if (res1 != res_ref)
|
||||
abort ();
|
||||
|
||||
res_ref &= MASK_VALUE;
|
||||
|
||||
if (res2 != res_ref)
|
||||
abort ();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue