From: Andrew Pinski <andrew.pinski@caviumnetworks.com>
To: Andrew Pinski <andrew.pinski@caviumnetworks.com>,
Steve Ellcey <sellcey@mips.com>,
gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com
Subject: Re: [patch] Performance patch for MIPS conditional move in expr.c
Date: Thu, 15 Nov 2012 21:39:00 -0000 [thread overview]
Message-ID: <CA+=Sn1mmzTO=sxCjw5Umg5AfCv729rDxTZRQLZTi=KZdGaX5Ag@mail.gmail.com> (raw)
In-Reply-To: <CA+=Sn1kpg7n7MpcpEMVrDVbbpQgfKNwxzuk9ggcL+wfz6fBDdw@mail.gmail.com>
On Thu, Nov 15, 2012 at 1:24 PM, Andrew Pinski
<andrew.pinski@caviumnetworks.com> wrote:
> On Thu, Nov 15, 2012 at 12:58 PM, Richard Sandiford
> <rdsandiford@googlemail.com> wrote:
>> Andrew Pinski <andrew.pinski@caviumnetworks.com> writes:
>>> 2012-07-26 Andrew Pinski <apinski@cavium.com>
>>>
>>> Bug #3261
>>> * config/mips/mips.md (*mov<GPR:mode>_on_<MOVECC:mode>):
>>> Remove mode check from comparisons.
>>> (*mov<SCALARF:mode>_on_<MOVECC:mode>): Likewise.
>>> (*mov<GPR:mode>_on_<GPR2:mode>_ne): New pattern to match
>>> when (ne A 0) can be just A.
>>>
>>> * testsuite/gcc.target/mips/movcc-4.c: New testcase.
>>
>> OK, thanks (but remember to remove the internal bug reference :-)).
>> I think this is early enough during stage 3 for the usual target
>> flexibility to apply.
>
> I was posting it for Steve's benefit really. I was in the process of
> updating the patch to the trunk and trying it out there before doing a
> formal submission :). As I found out the testcase needs to be changed
> to work with the new mips target test infrastructure. I will post a
> revised patch with the removal of the internal bug number once I
> finish fixing the testcase itself.
After fixing up the testcase I find xori still in the resulting code:
gcc$ ./cc1 t.c -O1 -o - -DNOMIPS16= -quiet -mabi=n32 -march=mips64 |grep xor
xori $2,$4,0x1
But that is because combine produces:
Trying 34 -> 35:
Failed to match this instruction:
(set (reg:SI 194 [ D.1393 ])
(if_then_else:SI (xor:SI (reg:SI 200 [ d ])
(const_int 1 [0x1]))
(reg:SI 6 $6 [ c ])
(reg:SI 5 $5 [ b ])))
But does not switch around the if_then_else as reg 200 has a non zero
bits of just 1. I will look into fix the rest of the problem later
today. So the above patch is a way forward but not the full fix.
Thanks,
Andrew Pinski
next prev parent reply other threads:[~2012-11-15 21:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 19:02 Steve Ellcey
2012-11-14 19:15 ` Andrew Pinski
2012-11-14 19:27 ` Steve Ellcey
2012-11-14 20:01 ` Andrew Pinski
2012-11-14 21:46 ` Steve Ellcey
2012-11-14 21:51 ` Andrew Pinski
2012-11-14 22:22 ` Andrew Pinski
2012-11-15 20:59 ` Richard Sandiford
2012-11-15 21:24 ` Andrew Pinski
2012-11-15 21:39 ` Andrew Pinski [this message]
2013-01-07 21:39 ` Steve Ellcey
2013-03-07 15:12 ` Jakub Jelinek
2013-03-07 16:01 ` Andrew Pinski
2012-11-15 1:51 ` Richard Henderson
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='CA+=Sn1mmzTO=sxCjw5Umg5AfCv729rDxTZRQLZTi=KZdGaX5Ag@mail.gmail.com' \
--to=andrew.pinski@caviumnetworks.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rdsandiford@googlemail.com \
--cc=sellcey@mips.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).