This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/1532: -O3 generates (obviously) redundant tests and jumps


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]