From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18160 invoked by alias); 18 Oct 2004 22:50:43 -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 18147 invoked by alias); 18 Oct 2004 22:50:42 -0000 Date: Mon, 18 Oct 2004 22:50:00 -0000 Message-ID: <20041018225042.18146.qmail@sourceware.org> From: "stevenb at suse dot de" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041018121604.18046.steven@gcc.gnu.org> References: <20041018121604.18046.steven@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/18046] Missed jump threading optimization X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg02457.txt.bz2 List-Id: ------- Additional Comments From stevenb at suse dot de 2004-10-18 22:50 ------- Subject: Re: Missed jump threading optimization Hmm, threading the default case sounds interesting, but the real reason why the RTL threader catches this and the tree threader does not is because on RTL the test case basically looks like this: extern void foo (void); extern int i; void bar (void) { if (i == 0) foo (); if (i == 0) foo (); } Hey, I can thread that! :-) So perhaps we should consider lowering SWITCH_EXPRs with only two targets to COND_EXPRs after all...? That would be quite easy to do. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18046