From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13176 invoked by alias); 7 Jul 2003 22:34:42 -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 13169 invoked by uid 48); 7 Jul 2003 22:34:42 -0000 Date: Mon, 07 Jul 2003 22:34:00 -0000 Message-ID: <20030707223442.13168.qmail@sources.redhat.com> From: "pinskia at physics dot uc dot edu" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030707222014.11457.user42@zip.com.au> References: <20030707222014.11457.user42@zip.com.au> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/11457] [3.3/3.4 Regression] redundant compare X-Bugzilla-Reason: CC X-SW-Source: 2003-07/txt/msg00743.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11457 pinskia at physics dot uc dot edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|optimization |target Ever Confirmed| |1 Keywords| |pessimizes-code Priority|P3 |P2 Last reconfirmed|0000-00-00 00:00:00 |2003-07-07 22:34:41 date| | Summary| |[3.3/3.4 Regression] | |redundant compare Target Milestone|--- |3.4 ------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-07 22:34 ------- I can confirm this on 3.3.1 (20030616) and the mainline (20030707), 3.2.3, and 3.0.4 but 2.95.3 did not produce the redundant compare so this is a regression. On PPC, I do not get a redundant compare though: _foo: cmpwi cr7,r3,0 blt- cr7,L2 bne- cr7,L3 b L_zero$stub L3: b L_non_negative$stub L2: b L_negative$stub Or on Vax: foo: .word 0x0 subl2 $4,%sp movl 4(%ap),%r0 jlss .L2 jneq .L3 calls $0,zero ret .L3: calls $0,non_negative ret .L2: calls $0,negative ret Or arm: foo: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. cmp r0, #0 @ lr needed for prologue blt .L2 bne .L3 b zero .L3: b non_negative .L2: b negative So it looks very ia32 specific.