From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32353 invoked by alias); 9 May 2004 22:11:17 -0000 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 Received: (qmail 32325 invoked by uid 48); 9 May 2004 22:11:17 -0000 Date: Sun, 09 May 2004 22:11:00 -0000 From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040509221117.15357.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug optimization/15357] New: [tree-ssa] combing if statements X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg00832.txt.bz2 List-Id: The following two functions should give the same asm (If the branch cost is high enough): int g(void); int h(int a, int b, int c, int d) { if (a==b) if (c==d) return g(); return 0; } int h1(int a, int b, int c, int d) { if (a==b && c==d) return g(); return 0; } And these two: int j(int a, int b, int c, int d) { if (a==b) goto a; if (c==d) goto a; else goto b; a: return g(); b: return 0; } int j1(int a, int b, int c, int d) { if (a==b || c==d) return g(); return 0; } -- Summary: [tree-ssa] combing if statements Product: gcc Version: tree-ssa Status: UNCONFIRMED Keywords: pessimizes-code, memory-hog, compile-time-hog Severity: enhancement Priority: P2 Component: optimization AssignedTo: pinskia at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org OtherBugsDependingO 15241,15348,15352 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15357