From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>,
Richard Earnshaw <Richard.Earnshaw@arm.com>,
Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>, nd <nd@arm.com>
Subject: Re: [PATCH, ARM] Further improve stack usage in sha512, part 2 (PR 77308)
Date: Wed, 21 Dec 2016 15:20:00 -0000 [thread overview]
Message-ID: <VI1PR0802MB262178E42A750233E76AED0F83930@VI1PR0802MB2621.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <AM4PR0701MB2162C4764A52C576446FF1D3E4900@AM4PR0701MB2162.eurprd07.prod.outlook.com>
Bernd Edlinger wrote:
On 12/20/16 16:09, Wilco Dijkstra wrote:
> > As a result of your patches a few patterns are unused now. All the Thumb-2 iordi_notdi*
> > patterns cannot be used anymore. Also I think arm_cmpdi_zero never gets used - a DI
>> mode compare with zero is always split into ORR during expand.
>
> I did not change anything for -mthumb -mfpu=neon for instance.
> Do you think that iordi_notdi* is never used also for that
> configuration?
With -mfpu=vfp or -msoft-float, these patterns cannot be used as logical operations are expanded before combine. Interestingly with -mfpu=neon ARM uses the orndi3_neon patterns (which are inefficient for ARM and probably should be disabled) but Thumb-2 uses the iordi_notdi patterns... So removing these reduces the number of patterns while we will still generate orn for Thumb-2.
> And if the arm_cmpdi_zero is never expanded, isn't it already
> unused before my patch?
It appears to be, so we don't need to fix it now. However when improving the expansion of comparisons it does trigger. For example x == 3 expands currently into 3 instructions:
cmp r1, #0
itt eq
cmpeq r0, #3
Tweaking arm_select_cc_mode uses arm_cmpdi_zero, and when expanded early we generate this:
eor r0, r0, #3
orrs r0, r0, r1
Using sub rather than eor would be even better of course.
Wilco
next prev parent reply other threads:[~2016-12-21 15:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-18 13:32 Bernd Edlinger
2016-12-20 15:29 ` Wilco Dijkstra
2016-12-20 18:52 ` Bernd Edlinger
2016-12-21 15:20 ` Wilco Dijkstra [this message]
2017-04-29 20:09 ` Bernd Edlinger
2017-05-12 16:55 ` [PING**2] " Bernd Edlinger
2017-06-01 16:02 ` [PING**3] " Bernd Edlinger
[not found] ` <d2793404-f5c5-fe88-cb16-51a38ffa05c0@hotmail.de>
2017-06-14 12:39 ` [PING**4] " Bernd Edlinger
2017-09-04 16:20 ` Kyrill Tkachov
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=VI1PR0802MB262178E42A750233E76AED0F83930@VI1PR0802MB2621.eurprd08.prod.outlook.com \
--to=wilco.dijkstra@arm.com \
--cc=Ramana.Radhakrishnan@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=bernd.edlinger@hotmail.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=kyrylo.tkachov@foss.arm.com \
--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).