public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hongtao Liu <crazylht@gmail.com>
To: Andrew Pinski <pinskia@gmail.com>
Cc: Jakub Jelinek <jakub@redhat.com>,
	liuhongt <hongtao.liu@intel.com>,
	 GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] i386: Fix up @xorsign<mode>3_1 [PR102224]
Date: Tue, 14 Sep 2021 10:06:51 +0800	[thread overview]
Message-ID: <CAMZc-bwigMr1+1TecFC3jvmRpDGJGbqX8qLNtzZLdq3ooV9Hrg@mail.gmail.com> (raw)
In-Reply-To: <CA+=Sn1=EJ8jUmVzmdOeazKLdqSnPBENu75-BBsVGjGkchYOs9Q@mail.gmail.com>

On Tue, Sep 14, 2021 at 8:58 AM Andrew Pinski <pinskia@gmail.com> wrote:
>
> On Wed, Sep 8, 2021 at 2:55 AM Hongtao Liu via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
> >
> > On Wed, Sep 8, 2021 at 5:33 PM Jakub Jelinek <jakub@redhat.com> wrote:
> > >
> > > On Wed, Sep 08, 2021 at 05:23:40PM +0800, Hongtao Liu wrote:
> > > > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> > > > >
> > > > Patch LGTM.
> > >
> > > Thanks, committed.
> > >
> > > > PS:
> > > >   I'm curious why we need the  post_reload splitter @xorsign<mode>3_1
> > > > for scalar mode, can't we just expand them into and/xor operations in
> > > > the expander, just like vector modes did.
> > > > Let me do some experiments to see whether it is ok to remove the splitter.
> > >
> > > I bet it is the question how should the code look like before RA.
> > > stv is somewhat related, but as that replaces whole chains, it can do:
> > > (insn 14 5 6 2 (set (subreg:V2DI (reg:DI 92) 0)
> > >         (vec_concat:V2DI (mem/c:DI (symbol_ref:SI ("c") [flags 0x2]  <var_decl 0x7f65a131fd80 c>) [1 c+0 S8 A64])
> > >             (const_int 0 [0]))) "hohohou.c":6:9 -1
> > >      (nil))
> > > on loads of memory.
> > > But it stv still does use paradoxical subregs:
> > > (insn 10 16 11 2 (set (subreg:V2DI (reg:DI 91) 0)
> > >         (minus:V2DI (subreg:V2DI (reg:DI 87) 0)
> > >             (subreg:V2DI (reg:DI 94) 0))) "hohohou.c":6:13 5003 {*subv2di3}
> > >      (expr_list:REG_DEAD (reg:DI 87)
> > >         (expr_list:REG_UNUSED (reg:CC 17 flags)
> > >             (nil))))
> > > (insn 11 10 0 2 (set (mem/c:DI (symbol_ref:SI ("a") [flags 0x2]  <var_decl 0x7f65a131fc60 a>) [1 a+0 S8 A64])
> > >         (reg:DI 91)) "hohohou.c":6:5 76 {*movdi_internal}
> > >      (expr_list:REG_DEAD (reg:DI 91)
> > >         (nil)))
> > > so perhaps just using paradoxical subregs everywhere would be ok?
> > Yes, I think so.
> > And I find paradoxical subreg like (subreg:V4SF (reg:SF)) are not
> > allowed by validate_subreg until r11-621.
> > That's why post_reload splitter is needed here.
>
> That is not exactly true.  It has been around since before 2005.  See
> https://gcc.gnu.org/PR24436 which is referencing the fixme comment in
> validate_subreg.
We also have things like (subreg:V4SF(reg:V2SF) 0), the problem of
defining post_reload splitter with V2SF is movv2sf is only defined
under TARGET_64BIT if there's no mmx(so should we also enable 64-bit
vector 32-bit mode?).
And for xorsign w/o post_reload splitter, the code is cleaner and even
more optimal.
>
> Thanks,
> Andrew Pinski
>
> Thanks,
> Andrew Pinski
>
> > >         Jakub
> > >
> >
> >
> >
> > --
> > BR,
> > Hongtao



-- 
BR,
Hongtao

  reply	other threads:[~2021-09-14  2:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  7:42 Jakub Jelinek
2021-09-08  9:23 ` Hongtao Liu
2021-09-08  9:33   ` Jakub Jelinek
2021-09-08 10:00     ` Hongtao Liu
2021-09-08 10:02       ` Jakub Jelinek
2021-09-08 10:15         ` Hongtao Liu
2021-09-08 10:07       ` Jakub Jelinek
2021-09-14  0:57       ` Andrew Pinski
2021-09-14  2:06         ` Hongtao Liu [this message]
2021-09-14  2:18           ` Hongtao Liu

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=CAMZc-bwigMr1+1TecFC3jvmRpDGJGbqX8qLNtzZLdq3ooV9Hrg@mail.gmail.com \
    --to=crazylht@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hongtao.liu@intel.com \
    --cc=jakub@redhat.com \
    --cc=pinskia@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).