Bug 26630 - [SRPM] curious '-mcpu=k6' optimizations
Summary: [SRPM] curious '-mcpu=k6' optimizations
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: zlib
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-08 01:22 UTC by Enrico Scholz
Modified: 2007-04-18 16:31 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-02-09 03:20:23 UTC
Embargoed:


Attachments (Terms of Use)

Description Enrico Scholz 2001-02-08 01:22:28 UTC
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-09 03:20:19 UTC
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-09 03:48:19 UTC
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.