From: Andrew Pinski <pinskia@gmail.com>
To: "William J. Schmidt" <wschmidt@linux.vnet.ibm.com>
Cc: gcc-patches@gcc.gnu.org, bergner@vnet.ibm.com, rguenther@suse.de
Subject: Re: [PATCH] Fix PR54240
Date: Tue, 14 Aug 2012 21:17:00 -0000 [thread overview]
Message-ID: <CA+=Sn1k=phAEP_Ky5b2i7GTwXe8z8bHJbnPdWPvvMY7t5Zu1jA@mail.gmail.com> (raw)
In-Reply-To: <CA+=Sn1koWriUxFuafJDZ9STiEO-GP7eFdguHPhXPnwONajAFmA@mail.gmail.com>
On Tue, Aug 14, 2012 at 2:15 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Tue, Aug 14, 2012 at 2:11 PM, William J. Schmidt
> <wschmidt@linux.vnet.ibm.com> wrote:
>> Replace the once vacuously true, and now vacuously false, test for
>> existence of a conditional move instruction for a given mode, with one
>> that actually checks what it's supposed to. Add a test case so we don't
>> miss such things in future.
>>
>> The test is powerpc-specific. It would be good to have an i386 version
>> of the test as well, if someone can help with that.
>>
>> Bootstrapped and tested on powerpc64-unknown-linux-gnu with no new
>> regressions. Ok for trunk?
>
> Here is one which can go into gcc.target/mips :
> /* { dg-do compile } */
> /* { dg-options "-O2 -fdump-tree-phiopt-details" } */
Sorry the dg-options should be:
/* { dg-options "-O2 -fdump-tree-phiopt-details isa>=4" } */
Thanks,
Andrew
>
> typedef struct s {
> int v;
> int b;
> struct s *l;
> struct s *r;
> } S;
>
>
> int foo(S *s)
> {
> S *this;
> S *next;
>
> this = s;
> if (this->b)
> next = this->l;
> else
> next = this->r;
>
> return next->v;
> }
>
> /* { dg-final { scan-tree-dump "Hoisting adjacent loads" "phiopt1" } } */
> /* { dg-final { cleanup-tree-dump "phiopt1" } } */
next prev parent reply other threads:[~2012-08-14 21:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 21:12 William J. Schmidt
2012-08-14 21:16 ` Andrew Pinski
2012-08-14 21:17 ` Andrew Pinski [this message]
2012-08-14 22:07 ` William J. Schmidt
2012-08-15 8:41 ` Richard Guenther
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+=Sn1k=phAEP_Ky5b2i7GTwXe8z8bHJbnPdWPvvMY7t5Zu1jA@mail.gmail.com' \
--to=pinskia@gmail.com \
--cc=bergner@vnet.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
--cc=wschmidt@linux.vnet.ibm.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).