Bug 70943 - Less than optimal code
Less than optimal code
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2002-08-07 00:03 EDT by Eric Hopper
Modified: 2007-04-18 12:45 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-08-07 00:06:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Eric Hopper 2002-08-07 00:03:48 EDT
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:

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 00:04:58 EDT
Created attachment 69226 [details]
Source file to compile to reproduce
Comment 2 Eric Hopper 2002-08-07 00:06:19 EDT
Created attachment 69227 [details]
The assembly language output
Comment 3 Jakub Jelinek 2002-08-07 07:34:48 EDT
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 07:44:30 EDT
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 07:50:11 EDT
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

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