From: Monk Chiang <monk.chiang@sifive.com>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: gcc-patches@gcc.gnu.org, rguenther@suse.de, kito.cheng@sifive.com
Subject: Re: [PATCH v2] RISC-V: Add split pattern to generate SFB instructions. [PR113095]
Date: Wed, 24 Jan 2024 20:04:28 +0800 [thread overview]
Message-ID: <CAMpi97z74yO1fJE5QvNmAOfEPG77=UGPeeL_UGptuxBkXeehLA@mail.gmail.com> (raw)
In-Reply-To: <ffa993a8-e955-480a-bcf3-6c68cb2438c6@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]
Thank you for your help. I will update the test case.
I test on the Coremark and have 5% improvement on the SiFive CPU.
On Tue, Jan 23, 2024 at 12:24 PM Jeff Law <jeffreyalaw@gmail.com> wrote:
>
>
> On 1/21/24 23:12, Monk Chiang wrote:
> > Since the match.pd transforms (zero_one == 0) ? y : z <op> y,
> > into ((typeof(y))zero_one * z) <op> y. Add splitters to recongize
> > this expression to generate SFB instructions.
> >
> > gcc/ChangeLog:
> > PR target/113095
> > * config/riscv/sfb.md: New splitters to rewrite single bit
> > sign extension as the condition to SFB instructions.
> >
> > gcc/testsuite/ChangeLog:
> > * gcc.target/riscv/sfb.c: New test.
> > * gcc.target/riscv/pr113095.c: New test.
> So the 113095 test is going to fail to link on rv64 causing a testsuite
> failure. I would suggest it have these dg-options lines instead of the
> one you provided:
>
> /* { dg-options "-O2 -march=rv32gc -mabi=ilp32d -mtune=sifive-7-series"
> { target { rv32 } } } */
> /* { dg-options "-O2 -march=rv64gc -mabi=lp64d -mtune=sifive-7-series" {
> target { rv64 } } } */
>
>
> A similar change is not strictly needed for the new sfb.c test since it
> only does a compile (but not a link) test.
>
> You still didn't indicating what testing was done for this patch.
> Standard practice is to build the compiler and run the testsuite with
> and without your change and verify there are no regressions. Ideally
> new tests should pass as well.
>
> I made the change above locally to pr113095.c to fix those failures on
> rv64. So this is OK with the adjustment to the dg-options line in the
> new pr113095 test.
>
> Jeff
>
>
prev parent reply other threads:[~2024-01-24 12:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 6:12 Monk Chiang
2024-01-23 4:24 ` Jeff Law
2024-01-24 12:04 ` Monk Chiang [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='CAMpi97z74yO1fJE5QvNmAOfEPG77=UGPeeL_UGptuxBkXeehLA@mail.gmail.com' \
--to=monk.chiang@sifive.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=kito.cheng@sifive.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).