From: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>
To: Eric Botcazou <ebotcazou@adacore.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Right way to represent flag-setting arithmetic instructions in MD files
Date: Fri, 10 Mar 2017 10:30:00 -0000 [thread overview]
Message-ID: <58C28049.70204@foss.arm.com> (raw)
In-Reply-To: <4999274.kuIoDLHJu9@polaris>
<resending due to mailing list failure>
On 10/03/17 10:23, Eric Botcazou wrote:
>> My understanding was that the order of the two in this pattern here doesn't
>> matter because there is an implicit PARALLEL around them, but I found that
>> the compare-elimination pass (compare-elim.c) assumes that the COMPARE set
>> must be in the second position for it to do the transformations it wants.
> Why do you want to use the compare-elimination pass exactly if the flags are
> exposed before reload, as is the case on Aarch64 I think? The combiner is
> supposed to do the same job instead for these targets.
>
I'm trying to improve the cases where the result of the arithmetic
operation is used in multiple places besides the comparison.
For example:
add w0, w0, w1
add w1, w0, 2
cmp w0, 0
Combine will not attempt to merge the first ADD and CMP because W0 is used
in the second ADD. The compare-elimination pass so far looks like a far simpler
place to implement this transformation than combine.
Thanks,
Kyrill
next prev parent reply other threads:[~2017-03-10 10:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 10:10 Kyrill Tkachov
2017-03-10 10:23 ` Eric Botcazou
2017-03-10 10:30 ` Kyrill Tkachov [this message]
2017-03-10 23:57 ` Segher Boessenkool
2017-03-13 9:53 ` Kyrill Tkachov
2017-03-13 16:43 ` Segher Boessenkool
2017-03-10 10:38 ` Jakub Jelinek
2017-03-10 11:45 ` Kyrylo 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=58C28049.70204@foss.arm.com \
--to=kyrylo.tkachov@foss.arm.com \
--cc=ebotcazou@adacore.com \
--cc=gcc@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).