Summary: | Duplicate loop conditions even with -Os | ||
---|---|---|---|
Product: | gcc | Reporter: | 94701-quiet |
Component: | rtl-optimization | Assignee: | Richard Henderson <rth> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, herbert |
Priority: | P3 | Keywords: | missed-optimization |
Version: | 3.0 | ||
Target Milestone: | --- | ||
Host: | i386-pc-linux-gnu | Target: | i386-pc-linux-gnu |
Build: | i386-pc-linux-gnu | Known to work: | |
Known to fail: | Last reconfirmed: |
Description
94701-quiet
2001-05-26 11:36:00 UTC
Responsible-Changed-From-To: unassigned->rth Responsible-Changed-Why: . State-Changed-From-To: open->closed State-Changed-Why: http://gcc.gnu.org/ml/gcc-patches/2002-10/msg00338.html From: rth@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: optimization/2960 Date: 7 Oct 2002 03:01:42 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: rth@gcc.gnu.org 2002-10-06 20:01:42 Modified files: gcc : ChangeLog toplev.c Log message: PR optimization/2960 * toplev.c (rest_of_compilation): Don't copy_loop_headers if optimize_size. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.15636&r2=1.15637 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.c.diff?cvsroot=gcc&r1=1.678&r2=1.679 Herbert Xu writes: Although the upstream fix certainly seems to have corrected the problem, gcc-3.3 -Os from unstable still generates basically the same code with the dupliate test of %ebx against k: a: pushl %ebp movl %esp, %ebp pushl %ebx movl 8(%ebp), %ebx cmpl %ebx, k jge .L7 .L5: call b cmpl %ebx, k jl .L5 .L7: popl %ebx leave ret .size a, .-a .comm k,4,4 .ident "GCC: (GNU) 3.3 (Debian)" -- This is already fixed on the mainline: a: pushl %ebp movl %esp, %ebp pushl %ebx movl 8(%ebp), %ebx .L7: cmpl %ebx, k jge .L6 call b jmp .L7 .L6: popl %ebx leave ret |