From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16326 invoked by alias); 12 Jun 2017 16:08:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 16316 invoked by uid 89); 12 Jun 2017 16:07:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f177.google.com Received: from mail-qt0-f177.google.com (HELO mail-qt0-f177.google.com) (209.85.216.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Jun 2017 16:07:58 +0000 Received: by mail-qt0-f177.google.com with SMTP id w1so131071204qtg.2 for ; Mon, 12 Jun 2017 09:08:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=8eVVipAGzJtw3Fo18yRCVJ8jrGixWz0MN3zd03+TAus=; b=o8RGHE2tEEU/g47/nfHh9XuCPT1ljDakLFDrBIqk1m1GTFEj2fSJL3k2Fk1wO93HB4 5yq6EaWzQwdYaH8C2A4ebtJ4IJ8KbdqnLj/Qioob7GCQAVymumYhJMYwI/r/4N5G5Yje 2n5KtnFr094eWoVTIBGOnCTvjf4EGiewG5VYf2dLI7tBAJkRfDWQE/rGY9hsfDCXIWpb esP4/3drF3Es8cGOP1bqvfOjGdk3aIt4HnARduciLcb7LoZuMHGAJrMo0v7YVFy0qYQh QPLdwJ8ggwPQBFRb6Em7mB1xVo0vX1usGvF137td4/bdkDEi46gvppEu4376mM2zCdHs 9+cg== X-Gm-Message-State: AODbwcDV2m2q72uyOjr/9rqL7zeZQ5JMp2iisQLU9qW9/taiCseXyqaO P4uy2lbXsuNGmY3jvY1DXeKL9l6a9A== X-Received: by 10.200.2.79 with SMTP id o15mr22260692qtg.26.1497283681099; Mon, 12 Jun 2017 09:08:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.104.86 with HTTP; Mon, 12 Jun 2017 09:08:00 -0700 (PDT) In-Reply-To: <4E89A029A0F8D443B436A5167BA3C53F199568BF@IRSMSX101.ger.corp.intel.com> References: <4E89A029A0F8D443B436A5167BA3C53F19956843@IRSMSX101.ger.corp.intel.com> <4E89A029A0F8D443B436A5167BA3C53F199568BF@IRSMSX101.ger.corp.intel.com> From: "H.J. Lu" Date: Mon, 12 Jun 2017 16:08:00 -0000 Message-ID: Subject: Re: [PATCH][X86] Fix rounding pattern similar to PR73350 To: "Koval, Julia" Cc: GCC Patches , Uros Bizjak , Kirill Yukhin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00810.txt.bz2 On Mon, Jun 12, 2017 at 9:06 AM, Koval, Julia wrote: > I would like to, but as far as I know the only testcase possible is below= , and as far as I know there is no possibility to use dg-error for runtime = exceptions(Sorry, if I'm wrong). There are only 2 versions of the flag exce= ption or no exception and the error is, when they are combined in CSE. Can you use if (wrong) abort (); in testcase? >> -----Original Message----- >> From: H.J. Lu [mailto:hjl.tools@gmail.com] >> Sent: Monday, June 12, 2017 3:43 PM >> To: Koval, Julia >> Cc: GCC Patches ; Uros Bizjak >> ; Kirill Yukhin >> Subject: Re: [PATCH][X86] Fix rounding pattern similar to PR73350 >> >> On Mon, Jun 12, 2017 at 6:21 AM, Koval, Julia wr= ote: >> > This is the same issue as PR73350 and PR80862 for disabling FP excepti= ons. >> > >> > gcc -O0 -mavx512f -mavx512er returns exception >> > gcc -O2 -mavx512f -mavx512er returns nan >> > >> > For this code: >> > >> > #include >> > #include >> > #include >> > #include >> > #include >> > >> > int main(int argc, char *argv[]) { >> > __m512 a =3D _mm512_set1_ps((float) -1); >> > __m512 b =3D _mm512_set1_ps((float) -1); >> > _mm_setcsr( _MM_MASK_MASK &~ >> > >> (_MM_MASK_OVERFLOW|_MM_MASK_INVALID|_MM_MASK_DIV_ZERO) ); >> > __m512 result1 =3D _mm512_rsqrt28_round_ps(a, _MM_FROUND_NO_EXC ); >> > printf("%d %d\n", _MM_FROUND_CUR_DIRECTION, >> _MM_FROUND_NO_EXC); >> > __m512 result2 =3D _mm512_rsqrt28_round_ps(a, >> _MM_FROUND_CUR_DIRECTION); >> > >> > printf("%g\n", result1[0] - result2[0]); >> > >> > return 0; >> > } >> > >> > This patch fixes the issue. >> > >> > gcc/ >> > * config/i386/i386.c: Fix rounding expand for new pattern >> > * config/i386/subst.md: Fix pattern (parallel -> unspec) >> > >> > Ok for trunk? >> > >> >> Please include the testcase. >> >> Thanks. >> >> -- >> H.J. --=20 H.J.