aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/avx512f-vgetmantps-1.c
blob: a3ce09e97c03d1e8fd2faed4e8785ea24b51a2b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* { dg-do compile } */
/* { dg-options "-O2 -mavx512f" } */
/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[\\n\]" 1 } } */
/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */

#include <immintrin.h>

volatile __m512 x, y;
volatile __mmask8 m;

void extern
avx512f_test (void)
{
  x = _mm512_getmant_ps (y, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src);
  x =
    _mm512_mask_getmant_ps (x, m, y, _MM_MANT_NORM_p75_1p5,
			    _MM_MANT_SIGN_src);
  x =
    _mm512_maskz_getmant_ps (m, y, _MM_MANT_NORM_p75_1p5,
			     _MM_MANT_SIGN_src);
  x = _mm512_getmant_round_ps (y, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src,
			 _MM_FROUND_NO_EXC);
  x =
    _mm512_mask_getmant_round_ps (x, m, y, _MM_MANT_NORM_p75_1p5,
			    _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
  x =
    _mm512_maskz_getmant_round_ps (m, y, _MM_MANT_NORM_p75_1p5,
			     _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
}