Bug 1652927 - Backport ppc64le str[n]cmp inlined code
Summary: Backport ppc64le str[n]cmp inlined code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1652926 1652928
TreeView+ depends on / blocked
 
Reported: 2018-11-23 15:29 UTC by Mark Wielaard
Modified: 2018-12-19 02:28 UTC (History)
10 users (show)

Fixed In Version: gcc-8.2.1-6.fc28 gcc-8.2.1-6.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-19 01:50:43 UTC
Type: Bug


Attachments (Terms of Use)

Description Mark Wielaard 2018-11-23 15:29:11 UTC
On ppc64le gcc8 generates inlined code for str[n]cmp that valgrind memcheck
cannot proof correct. gcc9/trunk generates slightly different code for the
inlined strncmp code that valgrind memcheck can proof correct with some
patches.

The gcc patch https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01589.html needs to be backported to solve this (and then at least glibc needs to be rebuild with the patched compiler).

Comment 1 Mark Wielaard 2018-11-28 19:52:09 UTC
This is now backported to the upstream gcc-8-branch:

Author: acsawdey
Date: Wed Nov 28 19:33:04 2018
New Revision: 266578

URL: https://gcc.gnu.org/viewcvs?rev=266578&root=gcc&view=rev
Log:
2018-11-28  Aaron Sawdey  <acsawdey@linux.ibm.com>

	Backport from mainline
	2018-10-25  Aaron Sawdey  <acsawdey@linux.ibm.com>

	* config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
	a shorter sequence with fewer branches.
	(emit_final_str_compare_gpr): Ditto.

	Backport from mainline to allow the above code to go in:
	2018-06-14  Aaron Sawdey  <acsawdey@linux.ibm.com>

	* config/rs6000/rs6000-string.c (do_and3, do_and3_mask,
	do_cmpb3, do_rotl3): New functions.



Modified:
    branches/gcc-8-branch/gcc/ChangeLog
    branches/gcc-8-branch/gcc/config/rs6000/rs6000-string.c

Comment 2 Mark Wielaard 2018-12-14 12:33:08 UTC
It would be great to also get this fixed for f28. Since that is the last Fedora release supporting ppc64[be].
f28, f29 and rawhide currently use the same gcc version.

Comment 3 Fedora Update System 2018-12-17 00:57:27 UTC
gcc-8.2.1-6.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-2541d28e6b

Comment 4 Fedora Update System 2018-12-18 02:12:11 UTC
gcc-8.2.1-6.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-59636246ac

Comment 5 Fedora Update System 2018-12-19 01:50:43 UTC
gcc-8.2.1-6.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2018-12-19 02:28:16 UTC
gcc-8.2.1-6.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


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