public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "luoxhu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/70053] Returning a struct of _Decimal128 values generates extraneous stores and loads
Date: Mon, 01 Jun 2020 02:40:10 +0000 [thread overview]
Message-ID: <bug-70053-4-1WgMe46MQL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-70053-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70053
--- Comment #9 from luoxhu at gcc dot gnu.org ---
(In reply to Segher Boessenkool from comment #8)
> I see no conversion there?
>
> But, why does it it store to memory at all?
Yes, no conversion for this case, only adjust_address to TImode. mem/c:TD means
a MEM cannot trap.
Reason of store to memory:
D.2914 is a local struct variable here, seems we need do some optimization to
sink the D.2914.td0 and D.2914.td1 from BB3&BB4 to BB5 to avoid store/load on
stack? Or if there already exists some pass in Gimple? Or should this be
optimized after expander by some new pass like store sink?
O2/pr70053.c.234t.optimized:
D256_add_finite (_Decimal128 a, _Decimal128 b, _Decimal128 c)
{
struct TDx2_t D.2914;
<bb 2> [local count: 1073741824]:
if (b_4(D) == c_5(D))
goto <bb 3>; [34.00%]
else
goto <bb 4>; [66.00%]
<bb 3> [local count: 365072224]:
D.2914.td0 = c_5(D);
D.2914.td1 = c_5(D);
goto <bb 5>; [100.00%]
<bb 4> [local count: 708669601]:
D.2914.td0 = a_3(D);
D.2914.td1 = b_4(D);
<bb 5> [local count: 1073741824]:
return D.2914;
}
next prev parent reply other threads:[~2020-06-01 2:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-70053-4@http.gcc.gnu.org/bugzilla/>
2020-05-21 5:29 ` luoxhu at gcc dot gnu.org
2020-05-22 14:59 ` wschmidt at gcc dot gnu.org
2020-05-25 8:06 ` luoxhu at gcc dot gnu.org
2020-05-25 9:50 ` luoxhu at gcc dot gnu.org
2020-05-25 17:22 ` segher at gcc dot gnu.org
2020-06-01 2:40 ` luoxhu at gcc dot gnu.org [this message]
2021-01-31 1:53 ` michaeljclark at mac dot com
2021-02-02 0:01 ` segher at gcc dot gnu.org
2022-10-28 6:56 ` LpSolit at gmail dot com
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=bug-70053-4-1WgMe46MQL@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).