From: Uros Bizjak <ubizjak@gmail.com>
To: "Koval, Julia" <julia.koval@intel.com>
Cc: Richard Biener <richard.guenther@gmail.com>,
Jakub Jelinek <jakub@redhat.com>,
"H.J. Lu" <hjl.tools@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Kirill Yukhin <kirill.yukhin@gmail.com>
Subject: Re: [PATCH][X86] Fix rounding pattern similar to PR73350
Date: Wed, 14 Jun 2017 09:54:00 -0000 [thread overview]
Message-ID: <CAFULd4ZXXYbPjgoO1_QY-Z+uuszMJfg=ZyF6GX2kZsrfXGVFuw@mail.gmail.com> (raw)
In-Reply-To: <4E89A029A0F8D443B436A5167BA3C53F19956B03@IRSMSX101.ger.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
On Tue, Jun 13, 2017 at 1:37 PM, Koval, Julia <julia.koval@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.
[-- Attachment #2: t.c --]
[-- Type: text/x-csrc, Size: 729 bytes --]
/* { 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 ();
}
next prev parent reply other threads:[~2017-06-14 9:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 13:21 Koval, Julia
2017-06-12 13:42 ` H.J. Lu
2017-06-12 16:06 ` Koval, Julia
2017-06-12 16:08 ` H.J. Lu
2017-06-12 16:18 ` Jakub Jelinek
2017-06-12 16:50 ` Koval, Julia
2017-06-13 8:08 ` Richard Biener
2017-06-13 11:37 ` Koval, Julia
2017-06-14 9:54 ` Uros Bizjak [this message]
2017-06-16 6:46 ` Koval, Julia
2017-06-16 7:05 ` Uros Bizjak
2017-06-20 18:26 ` Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFULd4ZXXYbPjgoO1_QY-Z+uuszMJfg=ZyF6GX2kZsrfXGVFuw@mail.gmail.com' \
--to=ubizjak@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=jakub@redhat.com \
--cc=julia.koval@intel.com \
--cc=kirill.yukhin@gmail.com \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).