From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12371 invoked by alias); 27 Apr 2011 20:12:16 -0000 Received: (qmail 12336 invoked by uid 22791); 27 Apr 2011 20:12:12 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Apr 2011 20:11:53 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3RKBrmW027435 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 27 Apr 2011 16:11:53 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3RKBqJG004395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 27 Apr 2011 16:11:52 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id p3RKBp5q018329; Wed, 27 Apr 2011 22:11:51 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id p3RKBphO018327; Wed, 27 Apr 2011 22:11:51 +0200 Date: Wed, 27 Apr 2011 20:33:00 -0000 From: Jakub Jelinek To: Kai Tietz Cc: GCC Patches , Richard Henderson Subject: Re: [patch gimplifier]: Do folding on truth and/or trees Message-ID: <20110427201151.GO17079@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-04/txt/msg02158.txt.bz2 On Wed, Apr 27, 2011 at 10:03:34PM +0200, Kai Tietz wrote: > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ gcc/gcc/testsuite/gcc.dg/binop-tand1.c 2011-04-27 21:31:19.276726900 +0200 > @@ -0,0 +1,14 @@ > +/* { dg-do compile } */ > +/* { dg-options "-O2 -fdump-tree-optimized" } */ > + > +int > +foo (int a, int b, int c) > +{ > + return ((!a && !b) && c && b && c && a); For testing of gimple-fold folding (rather than fold-const), it would be nice if you could also test those expressions from multiple source statements with some temporaries. Otherwise, fold-const will see everything together already when invoked from the FEs. > +/* We expect to see ""; confirm that, so that we know to count > + it in the real test. */ > +/* { dg-final { scan-tree-dump-times "\]*>" 1 "optimized" } } */ Why do you test number of bb's? I don't see how is that relevant to whether it has been optimized or not. On the other side, it would be nice if you could test your testcases with a cross compiler on a couple of other targets (e.g. powerpc64-linux -m32,-m64, and/or arm, s390 or something similar). BRANCH_COST etc. affect a lot how is this gimplified, and I believe there was a PR about some of your recent testcases failing on powerpc. You don't need to build cross binutils, all that is needed is configure the cross and build just cc1, don't mind that the build fails afterwards and just run it on your testcases by hand to see what is in the dumps. Jakub