PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realignin...
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512f-vrndscaleps-1.c
blobcbb469c5dedf3c63fc384d8cc1070ddefe8643f2
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512f -O2" } */
3 /* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 3 } } */
4 /* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 3 } } */
5 /* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
8 /* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
10 #include <immintrin.h>
12 volatile __m512 x;
14 void extern
15 avx512f_test (void)
17 x = _mm512_roundscale_ps (x, 0x42);
18 x = _mm512_ceil_ps (x);
19 x = _mm512_floor_ps (x);
20 x = _mm512_mask_roundscale_ps (x, 2, x, 0x42);
21 x = _mm512_mask_ceil_ps (x, 2, x);
22 x = _mm512_mask_floor_ps (x, 2, x);
23 x = _mm512_maskz_roundscale_ps (2, x, 0x42);
25 x = _mm512_roundscale_round_ps (x, 0x42, _MM_FROUND_NO_EXC);
26 x = _mm512_mask_roundscale_round_ps (x, 2, x, 0x42, _MM_FROUND_NO_EXC);
27 x = _mm512_maskz_roundscale_round_ps (2, x, 0x42, _MM_FROUND_NO_EXC);