public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: Richard Biener <rguenther@suse.de>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH] target/100312 - make x86 masked load builtins pure
Date: Thu, 29 Apr 2021 16:48:00 +0200	[thread overview]
Message-ID: <CAFULd4byesfv+5jPVAUz5qM0cqfAPVtKxwYM-5OYYauX=LxS7Q@mail.gmail.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.2104290924300.9200@zhemvz.fhfr.qr>

On Thu, Apr 29, 2021 at 9:25 AM Richard Biener <rguenther@suse.de> wrote:

> > > It eventually runs into the gcc_unreachable () at the very end of
> > > ix86_expand_builtin since IX86_BUILTIN_MASKLOADD and friends are
> > > no longer in the range of IX86_BUILTIN__BDESC_SPECIAL_ARGS_FIRST
> > > to IX86_BUILTIN__BDESC_SPECIAL_ARGS_LAST.
> >
> > How about the attached (untested) patch then?
>
> Ah yeah - good idea.
>
> The patch works, bootstrapped and tested on x86_64-unknown-linux-gnu.
>
> As expected it reduces the number of masked load builtins for the
> PR99912 testcase from ~800 to ~350 (at the GIMPLE level).

Thanks, pushed with the following ChangeLog:

i386: Mark x86 masked load builtins pure [PR100312]

Mark x86 AVX and AVX2 masked load builtins pure to enable dead code
elimination and more appropriate alias analysis.

2021-04-29  Uroš Bizjak  <ubizjak@gmail.com>
        Richard Biener  <rguenther@suse.de>
gcc/
    PR target/100312
    * config/i386/i386-builtin.def (IX86_BUILTIN_MASKLOADPD)
    (IX86_BUILTIN_MASKLOADPS, IX86_BUILTIN_MASKLOADPD256)
    (IX86_BUILTIN_MASKLOADPS256, IX86_BUILTIN_MASKLOADD)
    (IX86_BUILTIN_MASKLOADQ, IX86_BUILTIN_MASKLOADD256)
    (IX86_BUILTIN_MASKLOADQ256): Move from SPECIAL_ARGS
    to PURE_ARGS category.
    * config/i386/i386-builtins.c (ix86_init_mmx_sse_builtins):
    Handle PURE_ARGS category.
    * config/i386/i386-expand.c (ix86_expand_builtin): Ditto.

Uros.


> Thanks,
> Richard.

      reply	other threads:[~2021-04-29 14:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 11:02 Richard Biener
2021-04-28 11:23 ` Uros Bizjak
2021-04-28 11:46   ` Richard Biener
2021-04-28 12:11     ` Uros Bizjak
2021-04-28 13:32       ` Richard Biener
2021-04-28 15:07         ` Uros Bizjak
2021-04-29  7:25           ` Richard Biener
2021-04-29 14:48             ` Uros Bizjak [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='CAFULd4byesfv+5jPVAUz5qM0cqfAPVtKxwYM-5OYYauX=LxS7Q@mail.gmail.com' \
    --to=ubizjak@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=rguenther@suse.de \
    /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).