From: 钟居哲 <juzhe.zhong@rivai.ai>
To: rdapp.gcc <rdapp.gcc@gmail.com>, gcc-patches <gcc-patches@gcc.gnu.org>
Cc: rdapp.gcc <rdapp.gcc@gmail.com>,
kito.cheng <kito.cheng@gmail.com>,
kito.cheng <kito.cheng@sifive.com>,
"Jeff Law" <jeffreyalaw@gmail.com>
Subject: Re: Re: [PATCH] RISC-V: Support highest-number regno overlap for widen ternary vx instructions
Date: Mon, 4 Dec 2023 21:33:58 +0800 [thread overview]
Message-ID: <E8CEB4696F483B67+2023120421335814917012@rivai.ai> (raw)
In-Reply-To: <f8769554-5973-4c94-9328-78e744fe3513@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]
Adapt patch in V2 with explictly write constraints in the pattern:
[V2] RISC-V: Support highest-number regno overlap for widen ternary - Patchwork (sourceware.org)
Thanks.
juzhe.zhong@rivai.ai
From: Robin Dapp
Date: 2023-12-04 20:13
To: Juzhe-Zhong; gcc-patches
CC: rdapp.gcc; kito.cheng; kito.cheng; jeffreyalaw
Subject: Re: [PATCH] RISC-V: Support highest-number regno overlap for widen ternary vx instructions
> +(define_mode_attr widen_ternop_dest_constraint [
> + (RVVM8QI "=vd, vr, vd, vr, vd, vr, ?&vr")
> + (RVVM4QI "=vd, vr, vd, vr, vd, vr, ?&vr")
> + (RVVM2QI "=vd, vr, vd, vr, vd, vr, ?&vr")
> + (RVVM1QI "=vd, vr, vd, vr, vd, vr, ?&vr")
> + (RVVMF2QI "=vd, vr, vd, vr, vd, vr, ?&vr")
> + (RVVMF4QI "=vd, vr, vd, vr, vd, vr, ?&vr")
> + (RVVMF8QI "=vd, vr, vd, vr, vd, vr, ?&vr")
> + (RVVM8HI "=vd, vr, vd, vr, vd, vr, ?&vr")
[...]
I'm fine with avoiding the overlap but I'm not sure this is
easily maintainable because the constraints don't actually
depend on the mode? I suppose this is for easy re-use across
different insns but there are only six(?) widening patterns
so we don't even save lines of code by this?
I guess I would prefer the normal approach of writing it out
explicitly in the pattern. Maybe add a different replacement
method like define_subst in the future to simplify such
situations?
+ "vwmacc<u>.vx\t%0,%z3,%4%p1"
Why the z here? For canonicalization?
Regards
Robin
prev parent reply other threads:[~2023-12-04 13:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 10:11 Juzhe-Zhong
2023-12-04 12:13 ` Robin Dapp
2023-12-04 13:33 ` 钟居哲 [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=E8CEB4696F483B67+2023120421335814917012@rivai.ai \
--to=juzhe.zhong@rivai.ai \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=kito.cheng@gmail.com \
--cc=kito.cheng@sifive.com \
--cc=rdapp.gcc@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).