From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14896 invoked by alias); 7 Apr 2004 18:25:40 -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 14864 invoked by uid 48); 7 Apr 2004 18:25:35 -0000 Date: Wed, 07 Apr 2004 18:25:00 -0000 Message-ID: <20040407182535.14863.qmail@sources.redhat.com> From: "law at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040404172846.14848.kazu@cs.umass.edu> References: <20040404172846.14848.kazu@cs.umass.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug optimization/14848] [tree-ssa] prefer EQ_EXPR and NE_EXPR to ordered comparisons X-Bugzilla-Reason: CC X-SW-Source: 2004-04/txt/msg00660.txt.bz2 List-Id: ------- Additional Comments From law at gcc dot gnu dot org 2004-04-07 18:25 ------- (In reply to comment #2) > DOM's jump threading is causing this. Really? If you look at the .original dump you'll find that DOM is merely optimizing the comparisons which are provided by the front-end. ie, the .original dump looks like: ;; Function baz (baz) ;; enabled by -tree-original { if (a <= 0u) if (a == 0u) bar(a); } Note carefully the <= in the first conditonal. All DOM did was realize that the second conditional was subsumed by the first and eliminate the second conditional. It could be argued that DOM could clean up the first conditional and that may be a reasonable thing to do. However, it could also be argued that the FE shouldn't have generated such bogus code to begin with. jeff -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14848