From: Richard Sandiford <richard.sandiford@linaro.org>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Cc: James Greenhalgh <James.Greenhalgh@arm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>, nd <nd@arm.com>
Subject: Re: [PATCH][AArch64] Fix aarch64_ira_change_pseudo_allocno_class
Date: Wed, 30 May 2018 19:01:00 -0000 [thread overview]
Message-ID: <8736y99e1e.fsf@linaro.org> (raw)
In-Reply-To: <DB5PR08MB10304F47522ED3B2F3B76C20836C0@DB5PR08MB1030.eurprd08.prod.outlook.com> (Wilco Dijkstra's message of "Wed, 30 May 2018 10:26:10 +0000")
Wilco Dijkstra <Wilco.Dijkstra@arm.com> writes:
> Richard Sandiford <richard.sandiford@linaro.org>
>> The "?" change seems to make intrinsic sense given the extra cost of the
>> GPR alternative. But I think the real reason for this failure is that
>> we define no V1DF patterns, and target-independent code falls back to
>> using moves in the corresponding *integer* mode. So for that function
>> we generate the rather ugly code:
>
> This:
>
> typedef struct { double x; } X;
> X f2(X *p)
> {
> return *p;
> }
>
> emits at expand:
>
> (insn 6 3 7 2 (set (reg:DF 90 [ D.21009 ])
> (mem:DF (reg/v/f:DI 92 [ p ]) [2 *p_2(D)+0 S8 A64])) "vect_copy_lane_1.c":26 -1
> (nil))
> (insn 7 6 8 2 (set (subreg:DF (reg:DI 94) 0)
> (reg:DF 90 [ D.21009 ])) "vect_copy_lane_1.c":26 -1
> (nil))
> (insn 8 7 9 2 (set (reg:DI 95)
> (reg:DI 94)) "vect_copy_lane_1.c":26 -1
> (nil))
> (insn 9 8 13 2 (set (reg:DF 91 [ <retval> ])
> (subreg:DF (reg:DI 95) 0)) "vect_copy_lane_1.c":26 -1
> (nil))
>
> So the underlying cause is the structure passing code. Things get
> worse when you return 2 doubles and it really becomes horrific at 3...
Yeah, the handling of structures can also be poor, but float64x1_t is a
vector type rather than a structure, so I don't think the above is the
problem in the specific case of test_copy_laneq_f64.
float64x1_t has the TYPE_MODE we want (V1DF). But because we have
no V1DF move pattern, it ends up being moved as a DI instead.
Thanks,
Richard
next prev parent reply other threads:[~2018-05-30 18:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 16:20 Wilco Dijkstra
2018-05-22 17:17 ` Richard Sandiford
2018-05-23 11:22 ` Wilco Dijkstra
2018-05-23 11:53 ` Richard Sandiford
2018-05-25 13:41 ` Wilco Dijkstra
2018-05-29 16:01 ` James Greenhalgh
2018-05-29 18:12 ` Wilco Dijkstra
2018-05-29 20:32 ` Richard Sandiford
2018-05-30 10:40 ` Wilco Dijkstra
2018-05-30 19:01 ` Richard Sandiford [this message]
2018-05-31 8:38 ` Christophe Lyon
2018-05-31 9:32 ` Richard Sandiford
2018-05-31 11:22 ` Wilco Dijkstra
2018-05-31 12:53 ` Richard Sandiford
2018-05-31 19:27 ` James Greenhalgh
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=8736y99e1e.fsf@linaro.org \
--to=richard.sandiford@linaro.org \
--cc=James.Greenhalgh@arm.com \
--cc=Wilco.Dijkstra@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nd@arm.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).