On Tue, Jun 13, 2017 at 1:37 PM, Koval, Julia <julia.ko...@intel.com> wrote: > Thank you for your help. I fixed the test similar to existing sigaction tests. > > gcc/ > * config/i386/i386.c: Fix rounding expand for new pattern. > * config/i386/subst.md: Fix pattern (parallel -> unspec). > gcc/testsuite/ > * gcc.target/i386/pr73350-2.c: New test.
The test will fail at runtime on non-avx512er targets. Can you please test the attached testcase? Uros.
/* { dg-do run { target *-*-linux* *-*-gnu* } } */ /* { dg-options "-O2 -mavx512er" } */ /* { dg-require-effective-target avx512er } */ #include "avx512er-check.h" #include <x86intrin.h> #include <unistd.h> #include <signal.h> static int counter; void handler (int i) { counter++; } static void avx512er_test (void) { struct sigaction s; sigemptyset (&s.sa_mask); s.sa_handler = handler; s.sa_flags = 0; sigaction (SIGFPE, &s, NULL); __m512 a = _mm512_set1_ps (-1.f); _mm_setcsr ( _MM_MASK_MASK & ~_MM_MASK_INVALID ); volatile __m512 r1 = _mm512_rsqrt28_round_ps (a, _MM_FROUND_NO_EXC); volatile __m512 r2 = _mm512_rsqrt28_round_ps (a, _MM_FROUND_CUR_DIRECTION); if (counter != 1) abort (); }