Bug 486223

Summary: [LTC 6.0 FEAT] 201837: Exploit byte swap instructions lrv, lrvg
Product: Red Hat Enterprise Linux 6 Reporter: IBM Bug Proxy <bugproxy>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Michal Nowak <mnowak>
Severity: high Docs Contact:
Priority: low    
Version: 6.0CC: cward, hpicht, jjarvis, mnowak, notting, ohudlick, syeghiay
Target Milestone: rcKeywords: FutureFeature, OtherQA
Target Release: 6.0   
Hardware: s390x   
OS: All   
Whiteboard:
Fixed In Version: gcc-4.4.1-22.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-02 19:06:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 356741, 554559    

Description IBM Bug Proxy 2009-02-18 22:10:58 UTC
=Comment: #0=================================================
Hans-Georg Markgraf <mgrf.com> - 
1. Feature Overview:
Feature Id:	[201837]
a. Name of Feature:	Exploit byte swap instructions lrv, lrvg

b. Feature Description
Provides exploitation for the hardware instructions in System z architecture for performing byte
swap operations on memory and register operands. In order to make use of it the instructions have to
be integrated in the GCC back end machine description file. The instruction then is used for
implementing the GCC specific bswap family of builtins. That way programmers can directly trigger
usage of the instruction. Although this is useful for programmers aware of these builtins a better
way is to enable GCC to be able to recognized "manual" byte swapping implementations as well. In
order to do so GCC has to deal with combinations of shift and or operations which appear when
someone implements byte swapping "by hand". The item also covers the GCC enhancement which are
necessary to recognized these patterns and map it to a hardware byte swapping implementation.

2. Feature Details:
Sponsor:	zSeries
Architectures:
s390x

Arch Specificity: Purely Arch Specific Code
Affects Toolchain: Yes
Delivery Mechanism: Backport
Category:	Toolchain
Request Type:	Toolchain - Enhancement from IBM
Documentation work: yes

d. Upstream Acceptance:	Submitted
Sponsor Priority	1
f. Severity: High
IBM Confidential:	no
Code Contribution:	IBM code
g. Component Version Target:	gcc 4.5

3. Business Case
This feature provides improved performance by using a HW instruction for commonly used task, not
only manually triggered by the programmed, but also automatically when the compiler sense the pattern.

4. Primary contact at Red Hat: 
John Jarvis
jjarvis

5. Primary contacts at Partner:
Project Management Contact:
Hans-Georg Markgraf, mgrf.com, Boeblingen 49-7031-16-3978

Technical contact(s):
Gonzalo Muelas Serrano, gmuelas.com

IBM Manager:
Thomas Schwarz, t.schwarz.com

Comment 1 IBM Bug Proxy 2009-02-26 09:32:04 UTC
Hello Red Hat,

the GCC System z developer has updated that for this item there was a Middle-end Part that is should be backported for GCC 4.4, but it has been rejected upstream and apparently it is not anymore important for System z.

The Back-end part is already in GCC 4.4, so if RHEL 6 takes GCC 4.4 this feature will be included automatically.

Thank you!

Comment 2 Bill Nottingham 2009-02-26 16:53:43 UTC
RHEL 6 will include at least gcc-4.4, so marking as MODIFIED.

The feature requested has already been accepted into the upstream code base
planned for the next major release of Red Hat Enterprise Linux.

When the next milestone release of Red Hat Enterprise Linux 6 is available,
please verify that the feature requested is present and functioning as
desired.

Comment 3 IBM Bug Proxy 2009-03-02 11:10:56 UTC
comes via upstream gcc 4.4
therefore no code attach to feature BZ

Comment 4 releng-rhel@redhat.com 2009-10-29 13:44:23 UTC
Fixed in 'gcc-4.4.1-22.el6', included in compose 'RHEL6.0-20091028.0'.
Moving to ON_QA.

Comment 6 John Jarvis 2010-04-12 17:41:13 UTC
IBM is signed up to test and provide feedback.

Comment 8 IBM Bug Proxy 2010-06-23 12:20:56 UTC
------- Comment From mgrf.com 2010-06-23 08:10 EDT-------
This feature is verified on R6 snapshots
Set feature to "verified"  Thx

Comment 9 John Jarvis 2010-06-23 13:22:03 UTC
Setting Verified flag based on IBM's feedback

Comment 10 IBM Bug Proxy 2010-06-23 15:21:25 UTC
------- Comment From krebbel.ibm.com 2010-06-23 11:12 EDT-------
The bswap recognition pass does not seem to be part of the RHEL6 GCC. However the lrv and lrvg instructions are supported.

Comment 11 IBM Bug Proxy 2010-06-23 15:32:30 UTC
------- Comment From krebbel.ibm.com 2010-06-23 11:21 EDT-------
Re-reading comment #4 we obviously already decided that the bswap recognizer part is not important enough to be backported to 4.4 and I agree with that. So the feature is already complete with just supporting the hardware instructions as part of the back-end. I'll close the bz again.

Sorry for the confusion.

Comment 13 releng-rhel@redhat.com 2010-07-02 19:06:50 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.