From: Jeff Law <jeffreyalaw@gmail.com>
To: juzhe.zhong@rivai.ai, gcc-patches@gcc.gnu.org
Cc: kito.cheng@gmail.com, palmer@dabbelt.com
Subject: Re: [PATCH] RISC-V: Fix SEW64 of vrsub.vx runtime fail in RV32 system
Date: Sun, 2 Apr 2023 22:13:11 -0600 [thread overview]
Message-ID: <2fa75b34-889f-d6c7-ec91-25999acbde4b@gmail.com> (raw)
In-Reply-To: <20230403003855.113601-1-juzhe.zhong@rivai.ai>
On 4/2/23 18:38, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
> It's quite obvious that the order of vrsub SEW64 is wrong.
>
> gcc/ChangeLog:
>
> * config/riscv/vector.md: Fix incorrect operand order.
Note the formatting in that code is wrong on multiple levels. While I
don't typically get nit-picky on formatting, this needs serious cleanup
for gcc-14:
> if (riscv_vector::sew64_scalar_helper (
> operands,
> /* scalar op */&operands[3],
> /* vl */operands[5],
> <MODE>mode,
> <VM>mode,
> riscv_vector::simm5_p (operands[3]),
> [] (rtx *operands, rtx boardcast_scalar) {
> emit_insn (gen_pred_merge<mode> (operands[0], operands[1],
> operands[2], boardcast_scalar, operands[4], operands[5],
> operands[6], operands[7]));
> }))
Please review the coding standards, particularly with regards to
indention and function call parameters. When you find that you're
writing code like this:
emit_insn (gen_something (x, y,
x, p, q, r, s, t));
Please break it up. Pull the generator call out and store its result
in a temporary. Then fix the indention of its arguments so that it
looks like this:
temp = gen_something (some_long_argument, another_long_argument,
more_long_args, something_else);
The coding standards exist to make it easier for everyone to be able to
understand your code without having to waste mental energy parsing
different formatting styles.
As it stands I'm spending *far* too much mental energy just trying to
figure out what arguments are associated with what calls. That's just
crazy.
jeff
next prev parent reply other threads:[~2023-04-03 4:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 0:38 juzhe.zhong
2023-04-03 4:13 ` Jeff Law [this message]
2023-04-03 4:18 ` juzhe.zhong
2023-04-05 1:34 ` Jeff Law
2023-04-05 13:49 ` Jeff Law
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=2fa75b34-889f-d6c7-ec91-25999acbde4b@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=kito.cheng@gmail.com \
--cc=palmer@dabbelt.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).