public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/1532: -O3 generates (obviously) redundant tests and jumps
@ 2002-12-05 12:07 bangerth
  0 siblings, 0 replies; only message in thread
From: bangerth @ 2002-12-05 12:07 UTC (permalink / raw)
  To: duchier, gcc-bugs, gcc-prs, nobody

Synopsis: -O3 generates (obviously) redundant tests and jumps

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Dec  5 12:07:13 2002
State-Changed-Why:
    Confirmed. This is the relevant part of the assembler code:
    	cmpl	%eax, %edx
    	je	.L16
    	cmpl	%eax, %edx
    	jg	.L1
    	movl	%eax, %edx
    .L1:
    	popl	%ebp
    	movl	%edx, %eax
    	ret
    	.p2align 4,,7
    .L16:
    	leal	(%eax,%eax), %edx
    	jmp	.L1
    
    The two cmp operations are wasteful, and the one mov 
    operation before .L1 could be merged with the one
    after in a better control flow.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=1532


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-05 20:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-05 12:07 optimization/1532: -O3 generates (obviously) redundant tests and jumps bangerth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).