From: Richard Sandiford <richard.sandiford@arm.com>
To: bule <bule1@huawei.com>
Cc: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
gcc-help <gcc-help@gcc.gnu.org>,
"Yangfei \(Felix\)" <felix.yang@huawei.com>
Subject: Re: re: [AArch64][Spec2017]Question about mlow-precision-div optimization.
Date: Mon, 09 Mar 2020 12:28:51 +0000 [thread overview]
Message-ID: <mpt1rq1lnjw.fsf@arm.com> (raw)
In-Reply-To: <8FB10B4CA53A144E918874949D50CEB10228C695@dggeml528-mbx.china.huawei.com> (bule's message of "Mon, 9 Mar 2020 01:48:16 +0000")
Hi,
bule <bule1@huawei.com> writes:
> Thanks for the reply.
>
> I am an engineer from Huawei Technologies Co.,Ltd. And my company has signed
> the copyright assignment.
>
> My huawei email is: bule1@huawei.com
OK, great.
> diff -Nurp gcc-10.0/gcc/config/aarch64/aarch64.c gcc-10.0_opti/gcc/config/aarch64/aarch64.c
> --- gcc-10.0/gcc/config/aarch64/aarch64.c 2020-03-08 18:00:34.581798076 +0800
> +++ gcc-10.0_opti/gcc/config/aarch64/aarch64.c 2020-03-08 17:36:15.400515481 +0800
> @@ -12854,10 +12854,10 @@ aarch64_emit_approx_div (rtx quo, rtx nu
> /* Iterate over the series twice for SF and thrice for DF. */
> int iterations = (GET_MODE_INNER (mode) == DFmode) ? 3 : 2;
>
> - /* Optionally iterate over the series once less for faster performance,
> - while sacrificing the accuracy. */
> + /* Optionally iterate over the series less for faster performance,
> + while sacrificing the accuracy. The default is 2 for DF and 1 for SF. */
> if (flag_mlow_precision_div)
> - iterations--;
> + iterations = aarch64_double_recp_precision : aarch64_float_recp_precision;
This is missing the "GET_MODE_INNER (mode) == DFmode ?" part of the condition.
Adding that will take it over the 80-char limit, so it should be formatted as:
iterations = (GET_MODE_INNER (mode) == DFmode
? aarch64_double_recp_precision
: aarch64_float_recp_precision);
Looks good otherwise.
Could you try doing a bootstrap with that change and seeing if it
still works for your use case? If so, could you post the final patch?
Thanks,
Richard
next prev parent reply other threads:[~2020-03-09 12:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 1:48 bule
2020-03-09 12:28 ` Richard Sandiford [this message]
2020-03-12 12:22 bule
2020-03-13 9:30 ` Richard Sandiford
2020-03-13 10:06 bule
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=mpt1rq1lnjw.fsf@arm.com \
--to=richard.sandiford@arm.com \
--cc=Wilco.Dijkstra@arm.com \
--cc=bule1@huawei.com \
--cc=felix.yang@huawei.com \
--cc=gcc-help@gcc.gnu.org \
/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).