public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Robin Dapp <rdapp.gcc@gmail.com>
To: "Jeff Law" <jeffreyalaw@gmail.com>, 钟居哲 <juzhe.zhong@rivai.ai>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Cc: rdapp.gcc@gmail.com, "kito.cheng" <kito.cheng@gmail.com>,
	"kito.cheng" <kito.cheng@sifive.com>, palmer <palmer@dabbelt.com>,
	palmer <palmer@rivosinc.com>
Subject: Re: [PATCH] RISC-V: Support vfwmul.vv combine lowering
Date: Fri, 30 Jun 2023 12:14:21 +0200	[thread overview]
Message-ID: <ac3a6c52-732b-d6b4-d481-acd139e938c8@gmail.com> (raw)
In-Reply-To: <62be1be8-280f-2989-6a31-32c87dcbadcd@gmail.com>

> The explicit conversions I see are because we need the output of the
> conversion in multiple vfmul instructions.  That won't be helped by
> the patch you've proposed.

FWIW on my local branch and the patch applied I see that the vfwmuls
are being generated (all of the vfmuls are replaced).

> It'll need to be a define_insn_and_split as its a 3->3 splitter.  The
> split will emit the two extensions and the widening multiply as 3
> distinct insns.

I tried this and while it worked for the first vfwmul the subsequent
ones are not being combined/optimized.  Now I'm not a combine expert
at all but it looks as if the source float_extends are being deleted

 deferring deletion of insn with uid = 39.
 deferring deletion of insn with uid = 37.

with that pattern successfully matched, while they are only "rescanned"
with the synthetic "single widen" one.  Them being deleted (or rather
absorbed by the vfwmul) no further combination is possible (until after
split?)

This seems to be a fundamental difference between the two approaches.
Maybe the "double widen" pattern can be adjusted to also handle this
or I did something wrong when writing the splitter?

With the "single widen" pattern, however, it works more or less
naturally therefore I'd still suggest going for it.

Regards
 Robin

  reply	other threads:[~2023-06-30 10:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28  4:15 Juzhe-Zhong
2023-06-28 16:24 ` Jeff Law
2023-06-28 22:00   ` 钟居哲
2023-06-29 22:59     ` Jeff Law
2023-06-29 23:02       ` 钟居哲
2023-06-29 23:04       ` 钟居哲
2023-06-29 23:39     ` Jeff Law
2023-06-30 10:14       ` Robin Dapp [this message]
2023-06-30 22:35         ` Jeff Law
2023-07-01 11:45           ` Robin Dapp
     [not found]           ` <8D5801744511A6AD+6077E043-F267-4BC0-90B8-B2FCDCA10089@rivai.ai>
2023-07-03  7:49             ` Robin Dapp
2023-07-03  8:42               ` juzhe.zhong
2023-07-03  8:44                 ` Robin Dapp
2023-07-03  8:45                   ` juzhe.zhong
2023-07-03  8:49                     ` Robin Dapp
2023-07-03  8:51                       ` juzhe.zhong
2023-07-07 21:11                 ` Jeff Law
2023-07-07 23:05                   ` 钟居哲
2023-06-29 23:41     ` Jeff Law
     [not found]     ` <99D6E636A491D16D+F0E92F80-33DF-4109-912E-F9CAAD6F07B5@rivai.ai>
2023-06-29 23:48       ` Jeff Law
2023-06-30  0:44         ` juzhe.zhong
     [not found]   ` <2023062906005450585022@rivai.ai>
2023-06-28 22:59     ` 钟居哲

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=ac3a6c52-732b-d6b4-d481-acd139e938c8@gmail.com \
    --to=rdapp.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@gmail.com \
    --cc=kito.cheng@sifive.com \
    --cc=palmer@dabbelt.com \
    --cc=palmer@rivosinc.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).