[Bug target/11457] [3.3/3.4 Regression] redundant compare
pinskia at physics dot uc dot edu
gcc-bugzilla@gcc.gnu.org
Mon Jul 7 22:34:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list