From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22126 invoked by alias); 22 Feb 2006 12:47:48 -0000 Received: (qmail 22091 invoked by uid 48); 22 Feb 2006 12:47:43 -0000 Date: Wed, 22 Feb 2006 12:47:00 -0000 Message-ID: <20060222124743.22090.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/26406] Fowardprop does harm for VRP to figure out if a point is non zero In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg02502.txt.bz2 List-Id: ------- Comment #5 from rguenth at gcc dot gnu dot org 2006-02-22 12:47 ------- Of course we have the other case where we _have_ to propagate to optimize away the test (gcc.dg/tree-ssa/20030807-2.c): foo(int n) { int *space = (int *)__builtin_alloca (n); if (space == 0) abort (); else bar (space); } where there is a 2nd use of space: foo (n) { int * space; void * D.1899; long unsigned int D.1898; : D.1898_2 = (long unsigned int) n_1; D.1899_3 = __builtin_alloca (D.1898_2); space_4 = (int *) D.1899_3; if (space_4 == 0B) goto ; else goto ; :; abort (); :; bar (space_4); return; } So I think extending VRP is the only way to get both testcases optimized. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26406