Bug 26630 - [SRPM] curious '-mcpu=k6' optimizations
[SRPM] curious '-mcpu=k6' optimizations
Status: CLOSED NOTABUG
Product: Red Hat Raw Hide
Classification: Retired
Component: zlib (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-07 20:22 EST by Enrico Scholz
Modified: 2007-04-18 12:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-08 22:20:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2001-02-07 20:22:28 EST
zlib compiles with a '-mcpu=k6' on all (non-k6) ix86-platforms.

It would make more sense when writing

------------------
ZLIB_OPT_FLAGS=$RPM_OPT_FLAGS
%ifarch i386 i486 i586 i686
ZLIB_OPT_FLAGS="$ZLIB_OPT_FLAGS -O2 -fschedule-insns -fschedule-insns2
-malign-loops=1 -malign-jumps=1 -fomit
-frame-pointer"
%endif
------------------

instead of the formerly

------------------
%ifarch i386 i486 i586 i686
ZLIB_OPT_FLAGS="-mcpu=k6 -O2 -fschedule-insns -fschedule-insns2
-malign-loops=1 -malign-jumps=1 -fomit
-frame-pointer"
%else
ZLIB_OPT_FLAGS="$RPM_OPT_FLAGS"
%endif
------------------

code in zlib.spec. Because $RPM_OPT_FLAGS contains architecture specific
optimizations, an option corresponding to '-mcpu=k6' will be set by this
variant also.
Comment 1 Trond Eivind Glomsrxd 2001-02-08 22:20:19 EST
This (the k6 flag) was added when Ben went on an optimization spree for zlib...
Ben, should the -march=k6 be there?
Comment 2 Ben LaHaise 2001-02-08 22:48:19 EST
This is intentional.  Specifying K6 optimizations seems to have the best overall
performance for the Athlon/PIII/Pentium/K6 mix of CPUs (it makes a 30%
difference on K6s but only a ~3% difference for other cpus).  -march=k6 can't be
specified as the resulting code wouldn't run on 386/486s.

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