From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15745 invoked by alias); 14 Aug 2012 21:17:32 -0000 Received: (qmail 15736 invoked by uid 22791); 14 Aug 2012 21:17:31 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wg0-f51.google.com (HELO mail-wg0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Aug 2012 21:17:17 +0000 Received: by wgbed3 with SMTP id ed3so616767wgb.8 for ; Tue, 14 Aug 2012 14:17:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.231.208 with SMTP id l58mr8029982weq.138.1344979036513; Tue, 14 Aug 2012 14:17:16 -0700 (PDT) Received: by 10.216.229.136 with HTTP; Tue, 14 Aug 2012 14:17:16 -0700 (PDT) In-Reply-To: References: <1344978713.31850.6.camel@gnopaine> Date: Tue, 14 Aug 2012 21:17:00 -0000 Message-ID: Subject: Re: [PATCH] Fix PR54240 From: Andrew Pinski To: "William J. Schmidt" Cc: gcc-patches@gcc.gnu.org, bergner@vnet.ibm.com, rguenther@suse.de Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-08/txt/msg00930.txt.bz2 On Tue, Aug 14, 2012 at 2:15 PM, Andrew Pinski wrote: > On Tue, Aug 14, 2012 at 2:11 PM, William J. Schmidt > 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" } } */