From: Tamar Christina <Tamar.Christina@arm.com>
To: Bin.Cheng <amker.cheng@gmail.com>
Cc: James Greenhalgh <James.Greenhalgh@arm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>, nd <nd@arm.com>,
Marcus Shawcroft <Marcus.Shawcroft@arm.com>,
Richard Earnshaw <Richard.Earnshaw@arm.com>
Subject: RE: [PATCH][GCC][AArch64] optimize float immediate moves (2 /4) - HF/DF/SF mode.
Date: Tue, 01 Aug 2017 11:51:00 -0000 [thread overview]
Message-ID: <HE1PR0802MB23166ED79F8AA86E19157102FFB30@HE1PR0802MB2316.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAHFci28Kxt=VeFSZHd896eAbp+mJMiN7fZcbDe_P8CCOfNeVfQ@mail.gmail.com>
>
> Given review comment already pointed out big-endian issue and patch was
> updated to address it, I would expect reg-test on a big-endian target before
> applying patch, right?
The patch spent 6 months in external review.
Given that, I simply forgot to rerun big endian before the commit as I did the rest.
The failing tests were all added after the submission of this patch. I'll have a look.
> Thanks,
> bin
> >
> > OK for trunk?
> >
> > Thanks,
> > Tamar
> >
> >
> > gcc/
> > 2017-06-26 Tamar Christina <tamar.christina@arm.com>
> > Richard Sandiford <richard.sandiford@linaro.org>
> >
> > * config/aarch64/aarch64.md (mov<mode>): Generalize.
> > (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
> > Add integer and movi cases.
> > (movi-split-hf-df-sf split, fp16): New.
> > (enabled): Added TARGET_FP_F16INST.
> > * config/aarch64/iterators.md (GPF_HF): New.
> > ________________________________________
> > From: Tamar Christina
> > Sent: Wednesday, June 21, 2017 11:48:33 AM
> > To: James Greenhalgh
> > Cc: GCC Patches; nd; Marcus Shawcroft; Richard Earnshaw
> > Subject: RE: [PATCH][GCC][AArch64] optimize float immediate moves (2 /4)
> - HF/DF/SF mode.
> >
> >> > movi\\t%0.4h, #0
> >> > - mov\\t%0.h[0], %w1
> >> > + fmov\\t%s0, %w1
> >>
> >> Should this not be %h0?
> >
> > The problem is that H registers are only available in ARMv8.2+, I'm
> > not sure what to do about ARMv8.1 given your other feedback Pointing
> > out that the bit patterns between how it's stored in s vs h registers
> > differ.
> >
> >>
> >> > umov\\t%w0, %1.h[0]
> >> > mov\\t%0.h[0], %1.h[0]
> >> > + fmov\\t%s0, %1
> >>
> >> Likewise, and much more important for correctness as it changes the
> >> way the bit pattern ends up in the register (see table C2-1 in
> >> release B.a of the ARM Architecture Reference Manual for ARMv8-A),
> here.
> >>
> >> > + * return aarch64_output_scalar_simd_mov_immediate
> (operands[1],
> >> > + SImode);
> >> > ldr\\t%h0, %1
> >> > str\\t%h1, %0
> >> > ldrh\\t%w0, %1
> >> > strh\\t%w1, %0
> >> > mov\\t%w0, %w1"
> >> > - [(set_attr "type"
> >> "neon_move,neon_from_gp,neon_to_gp,neon_move,\
> >> > - f_loads,f_stores,load1,store1,mov_reg")
> >> > - (set_attr "simd" "yes,yes,yes,yes,*,*,*,*,*")]
> >> > + "&& can_create_pseudo_p ()
> >> > + && !aarch64_can_const_movi_rtx_p (operands[1], HFmode)
> >> > + && !aarch64_float_const_representable_p (operands[1])
> >> > + && aarch64_float_const_rtx_p (operands[1])"
> >> > + [(const_int 0)]
> >> > + "{
> >> > + unsigned HOST_WIDE_INT ival;
> >> > + if (!aarch64_reinterpret_float_as_int (operands[1], &ival))
> >> > + FAIL;
> >> > +
> >> > + rtx tmp = gen_reg_rtx (SImode);
> >> > + aarch64_expand_mov_immediate (tmp, GEN_INT (ival));
> >> > + tmp = simplify_gen_subreg (HImode, tmp, SImode, 0);
> >> > + emit_move_insn (operands[0], gen_lowpart (HFmode, tmp));
> >> > + DONE;
> >> > + }"
> >> > + [(set_attr "type"
> "neon_move,f_mcr,neon_to_gp,neon_move,fconsts,
> >> \
> >> > + neon_move,f_loads,f_stores,load1,store1,mov_reg")
> >> > + (set_attr "simd" "yes,*,yes,yes,*,yes,*,*,*,*,*")]
> >> > )
> >>
> >> Thanks,
> >> James
> >
next prev parent reply other threads:[~2017-08-01 11:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 11:38 Tamar Christina
2017-06-12 7:31 ` Tamar Christina
2017-06-14 10:06 ` Richard Sandiford
2017-06-15 13:25 ` Tamar Christina
2017-06-15 14:28 ` Tamar Christina
2017-06-16 7:53 ` Richard Sandiford
2017-06-16 8:42 ` Tamar Christina
2017-06-14 8:43 ` James Greenhalgh
2017-06-21 10:48 ` Tamar Christina
2017-06-26 10:50 ` Tamar Christina
2017-07-03 6:12 ` Tamar Christina
2017-07-10 7:35 ` Tamar Christina
2017-07-27 16:09 ` James Greenhalgh
2017-08-01 11:47 ` Bin.Cheng
2017-08-01 11:51 ` Tamar Christina [this message]
2017-08-01 12:04 ` Bin.Cheng
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=HE1PR0802MB23166ED79F8AA86E19157102FFB30@HE1PR0802MB2316.eurprd08.prod.outlook.com \
--to=tamar.christina@arm.com \
--cc=James.Greenhalgh@arm.com \
--cc=Marcus.Shawcroft@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=amker.cheng@gmail.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).