Bug 70943 - Less than optimal code
Summary: Less than optimal code
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.3
Hardware: athlon
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-07 04:03 UTC by Eric Hopper
Modified: 2007-04-18 16:45 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-08-07 04:06:23 UTC
Embargoed:


Attachments (Terms of Use)
Source file to compile to reproduce (1.12 KB, text/plain)
2002-08-07 04:04 UTC, Eric Hopper
no flags Details
The assembly language output (3.19 KB, text/plain)
2002-08-07 04:06 UTC, Eric Hopper
no flags Details

Description Eric Hopper 2002-08-07 04:03:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020606

Description of problem:
These two functions should generate much more similar assembly.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Take the example file, testswitch.cxx
2.g++ -pipe -march=athlon -mcpu=athlon -O2 -S testswitch.cxx
3.Look at testswitch.s and see how assembly output for functions test and test2
are pretty different.
	

Additional info: gcc-c++-2.96-112

Comment 1 Eric Hopper 2002-08-07 04:04:58 UTC
Created attachment 69226 [details]
Source file to compile to reproduce

Comment 2 Eric Hopper 2002-08-07 04:06:19 UTC
Created attachment 69227 [details]
The assembly language output

Comment 3 Jakub Jelinek 2002-08-07 11:34:48 UTC
This is certainly nothing which will change in 2.96-RH, as it is in
important bugfixes mode only.
If you get the same behaviour with gcc 3.3, file an enhancement request
at http://gcc.gnu.org/gnats.html.

Comment 4 Eric Hopper 2002-08-07 11:44:30 UTC
Well, I would love to test it on gcc 3.3 or something similar, but those things
aren't available in a standard non-beta distribution yet.  In fact AFAIK, gcc
3.3 isn't even released yet.

It seems odd to me that I should have to download and hand-build the unstable
CVS tree for a compiler simply so I can report a case of inadequate optimization.

Of course, the differences between 2.96 and 3.2 in the optimization department
are rather marked.  So if you insist I try it in a 3.2 version when RH 8.0 comes
out, I'll do so.

Comment 5 Jakub Jelinek 2002-08-07 11:50:11 UTC
Well, at least 3.1 is available for 7.3 as secondary compiler (there is
a special RHN channel for it), so you can check that. The point in filing
PR in gcc GNATS is that your enhancement request will get there greater
audience.


Note You need to log in before you can comment on or make changes to this bug.