public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kirill Yukhin <kirill.yukhin@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Uros Bizjak <ubizjak@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Improve AVX512F sse4_1_round* patterns
Date: Thu, 28 Apr 2016 14:28:00 -0000	[thread overview]
Message-ID: <20160428142738.GC31772@msticlxl57.ims.intel.com> (raw)
In-Reply-To: <20160427213433.GI26501@tucnak.zalov.cz>

Hi Jakub,
On 27 Apr 23:34, Jakub Jelinek wrote:
> Hi!
> 
> While AVX512F doesn't contain EVEX encoded vround{ss,sd,ps,pd} instructions,
> it contains vrndscale* which performs the same thing if bits [4:7] of the
> immediate are zero.
> 
> For _mm*_round_{ps,pd} we actually already emit vrndscale* for -mavx512f
> instead of vround* unconditionally (because
> <avx512>_rndscale<mode><mask_name><round_saeonly_name>
> instruction has the same RTL as <sse4_1>_round<ssemodesuffix><avxsizesuffix>
> and the former, enabled for TARGET_AVX512F, comes first), for the scalar
> cases (thus __builtin_round* or _mm*_round_s{s,d}) the patterns we have
> don't allow extended registers and thus we end up with unnecessary moves
> if the inputs and/or outputs are or could be most effectively allocated
> in the xmm16+ registers.
> 
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk?
Your patch is OK.
> 
> 2016-04-27  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* config/i386/i386.md (sse4_1_round<mode>2): Add avx512f alternative.
> 	* config/i386/sse.md (sse4_1_round<ssescalarmodesuffix>): Likewise.
> 
> 	* gcc.target/i386/avx-vround-1.c: New test.
> 	* gcc.target/i386/avx-vround-2.c: New test.
> 	* gcc.target/i386/avx512vl-vround-1.c: New test.
> 	* gcc.target/i386/avx512vl-vround-2.c: New test.

--
Thanks, K

      reply	other threads:[~2016-04-28 14:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27 21:34 Jakub Jelinek
2016-04-28 14:28 ` Kirill Yukhin [this message]

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=20160428142738.GC31772@msticlxl57.ims.intel.com \
    --to=kirill.yukhin@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=ubizjak@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).