From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14224 invoked by alias); 4 Jan 2007 19:54:00 -0000 Received: (qmail 14216 invoked by uid 22791); 4 Jan 2007 19:54:00 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.172) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 04 Jan 2007 19:53:56 +0000 Received: by ug-out-1314.google.com with SMTP id s2so5426762uge for ; Thu, 04 Jan 2007 11:53:54 -0800 (PST) Received: by 10.82.162.14 with SMTP id k14mr1642826bue.1167940433947; Thu, 04 Jan 2007 11:53:53 -0800 (PST) Received: by 10.82.150.13 with HTTP; Thu, 4 Jan 2007 11:53:53 -0800 (PST) Message-ID: <84fc9c000701041153h64404483l207bc4d7333101f2@mail.gmail.com> Date: Thu, 04 Jan 2007 19:54:00 -0000 From: "Richard Guenther" To: "Robert Kennedy" Subject: Re: [PATCH] Fold more aggressively for trip counts Cc: gcc-patches@gcc.gnu.org In-Reply-To: <17821.23092.925585.601518@whippen.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <17819.5994.111024.985123@whippen.corp.google.com> <84fc9c000701030557y771149b5kb19643b0a50dd502@mail.gmail.com> <17821.22245.42440.581996@whippen.corp.google.com> <84fc9c000701041145x79441d61o89b42aef4003b516@mail.gmail.com> <17821.23092.925585.601518@whippen.corp.google.com> 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: 2007-01/txt/msg00261.txt.bz2 On 1/4/07, Robert Kennedy wrote: > > Well, a testcase looks like > > > > int foo(int a) > > { > > return a * 1000 > 0; > > } > > > > and then check the gimple tree dump. > > I tried that. Somehow (I'm not sure how) it gets folded anyway without > my change. Whatever is doing it in that context does not apply during > the loop optimizations. I see the condition survive until asm even with -O2 on i686. Richard.