From: Jeff Law <jeffreyalaw@gmail.com>
To: Robin Dapp <rdapp.gcc@gmail.com>,
"juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>,
gcc-patches <gcc-patches@gcc.gnu.org>,
palmer <palmer@dabbelt.com>, "kito.cheng" <kito.cheng@gmail.com>
Subject: Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.
Date: Wed, 16 Aug 2023 16:59:13 -0600 [thread overview]
Message-ID: <67bb40ce-8106-2c44-d82b-dbef32fbf426@gmail.com> (raw)
In-Reply-To: <053a66e1-5d7d-57db-3b51-e5514c18a7f1@gmail.com>
On 8/16/23 07:50, Robin Dapp wrote:
>> But if it's a float16 precision issue then I would have expected both
>> the computations for the lhs and rhs values to have suffered
>> similarly.
>
> Yeah, right. I didn't look closely enough. The problem is not the
> reduction but the additional return-value conversion that is omitted
> when calculating the reference value inline.
>
> The attached is simpler and does the trick.
>
> Regards
> Robin
>
> Subject: [PATCH v2] RISC-V: Fix reduc_strict_run-1 test case.
>
> This patch fixes the reduc_strict_run-1 testcase by converting
> the reference value to double and back to the tested type.
> Without that omitted the implicit return-value conversion and
> would produce a different result for _Float16.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.target/riscv/rvv/autovec/reduc/reduc_strict_run-1.c:
> Perform type -> double -> type conversion for reference value.
OK
jeff
next prev parent reply other threads:[~2023-08-16 22:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 15:49 Robin Dapp
2023-08-16 1:13 ` Jeff Law
2023-08-16 1:21 ` juzhe.zhong
2023-08-16 2:41 ` Jeff Law
2023-08-16 13:50 ` Robin Dapp
2023-08-16 22:59 ` Jeff Law [this message]
2023-08-16 23:21 ` Palmer Dabbelt
2023-08-17 8:26 ` Robin Dapp
2023-08-16 6:29 ` juzhe.zhong
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=67bb40ce-8106-2c44-d82b-dbef32fbf426@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 \
--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).