public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: "Kirill Yukhin" <kirill.yukhin@gmail.com>,
	"Richard Biener" <richard.guenther@gmail.com>,
	"Martin Liška" <mliska@suse.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] x86: Check TARGET_AVX512VL when enabling FMA
Date: Fri, 10 Jul 2020 04:08:01 -0700	[thread overview]
Message-ID: <CAMe9rOqoGCQ=fX8Zx_roz=Knw9R4qJGORM46Dw4DnEGXTYWG9g@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOoVt4EtOOK6-2ZPyQgkF-Zz2nF-EmuR6gNpY+YZ4Zfr0w@mail.gmail.com>

On Thu, Jul 9, 2020 at 3:02 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Thu, Jul 9, 2020 at 6:35 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Thu, Jul 9, 2020 at 5:04 AM Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> > >
> > > On 07 июл 09:06, H.J. Lu wrote:
> > > > On Tue, Jul 7, 2020 at 8:56 AM Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> > > > >
> > > > > Hello HJ,
> > > > >
> > > > > On 28 июн 07:19, H.J. Lu via Gcc-patches wrote:
> > > > > > Enable FMA in rsqrt<mode>2 expander and fold rsqrtv16sf2 expander into
> > > > > > rsqrt<mode>2 expander which expands to UNSPEC_RSQRT28 for TARGET_AVX512ER.
> > > > > > Although it doesn't show performance change in our workloads, FMA can
> > > > > > improve other workloads.
> > > > > >
> > > > > > gcc/
> > > > > >
> > > > > >       PR target/88713
> > > > > >       * config/i386/i386-expand.c (ix86_emit_swsqrtsf): Enable FMA.
> > > > > >       * config/i386/sse.md (VF_AVX512VL_VF1_128_256): New.
> > > > > >       (rsqrt<mode>2): Replace VF1_128_256 with VF_AVX512VL_VF1_128_256.
> > > > > >       (rsqrtv16sf2): Removed.
> > > > > >
> > > > > > gcc/testsuite/
> > > > > >
> > > > > >       PR target/88713
> > > > > >       * gcc.target/i386/pr88713-1.c: New test.
> > > > > >       * gcc.target/i386/pr88713-2.c: Likewise.
> > > > >
> > > > > So, you've introduced new rsqrt expanders for DF vectors and relaxed
> > > > > condition for V16SF. What I didn't get is why did you change unspec
> > > > > type from RSQRT to RSQRT28 for V16SF expander?
> > > > >
> > > >
> > > > UNSPEC in define_expand is meaningless when the pattern is fully
> > > > expanded by ix86_emit_swsqrtsf.  I believe that UNSPEC in rsqrt<mode>2
> > > > expander can be removed.
> > >
> > > Agree.
> >
> > I will leave UNSPEC alone here.
> >
> > > --- /dev/null
> > > +++ b/gcc/testsuite/gcc.target/i386/pr88713-1.c
> > > @@ -0,0 +1,13 @@
> > > +/* { dg-do compile } */
> > > +/* { dg-options "-O2 -Ofast -mno-avx512f -mfma" } */
> > >
> > > I gues -O2 is useless here (and in -2.c test).
> >
> > Fixed.
> >
> > > Othwerwise LGTM.
> > >
> >
> > This is the patch I am checking in.
> >
>
> This patch is needed for
>
> FAIL: gcc.target/i386/avx512er-vrsqrt28ps-3.c (internal compiler error)
> FAIL: gcc.target/i386/avx512er-vrsqrt28ps-3.c (test for excess errors)
> FAIL: gcc.target/i386/avx512er-vrsqrt28ps-4.c (internal compiler error)
> FAIL: gcc.target/i386/avx512er-vrsqrt28ps-4.c (test for excess errors)
> FAIL: gcc.target/i386/avx512er-vrsqrt28ps-5.c (internal compiler error)
> FAIL: gcc.target/i386/avx512er-vrsqrt28ps-5.c (test for excess errors)
> FAIL: gcc.target/i386/avx512er-vrsqrt28ps-6.c (internal compiler error)
> FAIL: gcc.target/i386/avx512er-vrsqrt28ps-6.c (test for excess errors)
>

This fixed:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96144

-- 
H.J.

  reply	other threads:[~2020-07-10 11:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28 14:19 [PATCH] x86: Enable FMA in rsqrt<mode>2 expander H.J. Lu
2020-07-07 15:56 ` Kirill Yukhin
2020-07-07 16:06   ` H.J. Lu
2020-07-09 12:04     ` Kirill Yukhin
2020-07-09 13:35       ` H.J. Lu
2020-07-09 22:02         ` [PATCH] x86: Check TARGET_AVX512VL when enabling FMA H.J. Lu
2020-07-10 11:08           ` H.J. Lu [this message]
2020-07-10 11:18           ` Jakub Jelinek
2020-07-10 11:28             ` H.J. Lu
2020-07-13 16:12         ` [PATCH] x86: Rename VF_AVX512VL_VF1_128_256 to VF1_AVX512ER_128_256 H.J. Lu
2020-07-17  2:50           ` H.J. Lu
2020-07-17 12:14             ` H.J. Lu

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='CAMe9rOqoGCQ=fX8Zx_roz=Knw9R4qJGORM46Dw4DnEGXTYWG9g@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kirill.yukhin@gmail.com \
    --cc=mliska@suse.cz \
    --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).