From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30112 invoked by alias); 5 Jan 2003 23:07:39 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 30063 invoked from network); 5 Jan 2003 23:07:38 -0000 Received: from unknown (HELO egil.codesourcery.com) (66.92.14.122) by 209.249.29.67 with SMTP; 5 Jan 2003 23:07:38 -0000 Received: from zack by egil.codesourcery.com with local (Exim 3.36 #1 (Debian)) id 18VJra-0005Iw-00; Sun, 05 Jan 2003 15:07:26 -0800 To: martin@xemacs.org Cc: gcc@gcc.gnu.org Subject: Re: More embarrassing failures to optimize From: Zack Weinberg Date: Sun, 05 Jan 2003 23:11:00 -0000 In-Reply-To: <15896.46933.195908.799606@wobble.local> (Martin Buchholz's message of "Sun, 5 Jan 2003 14:53:09 -0800") Message-ID: <873co742mp.fsf@egil.codesourcery.com> User-Agent: Gnus/5.090011 (Oort Gnus v0.11) Emacs/21.2 (i386-pc-linux-gnu) References: <15895.61324.872456.502039@wobble.local> <87of6vh233.fsf@egil.codesourcery.com> <15896.46933.195908.799606@wobble.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-01/txt/msg00242.txt.bz2 Martin Buchholz writes: >>>>>> "Z" == Zack Weinberg writes: > > Z> I suspect this is the same underlying problem that causes > Z> gcc.c-torture/execute/builtin-constant.c to fail. This was discussed > Z> at some length in the thread starting at > Z> http://gcc.gnu.org/ml/gcc-patches/2002-11/msg00235.html - it's > Z> nontrivial to fix. > > Independently of whether it's related to builtin_constant_p, the fact > that the class containing the direct conversion to bool can be > optimized as desired suggests a different approach for improving > optimization: You misunderstand. The problem is a general one, having to do with calculating common-subexpression information across basic block boundaries. __builtin_constant_p is a convenient way to turn a poor-optimization issue into a visible-behavior-change issue. zw