Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2141718

Summary: __builtin_cpu_is ("sapphirerapids") failed on SPR with GTS12.0 DTS12.0 [RHEL 9.2/GTS 12.1]
Product: Red Hat Enterprise Linux 9 Reporter: Hongtao Liu <crazylht>
Component: gccAssignee: Marek Polacek <mpolacek>
gcc sub component: gcc-toolset-12 QA Contact: Václav Kadlčík <vkadlcik>
Status: CLOSED ERRATA Docs Contact: Jacob Taylor Valdez <jvaldez>
Severity: urgent    
Priority: unspecified CC: annita.zhang, fweimer, jvaldez, mpolacek, vkadlcik
Version: 9.1Keywords: Bugfix, Triaged, ZStream
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-toolset-12-gcc-12.2.1-4.el9 Doc Type: Known Issue
Doc Text:
.GCC in GCC Toolset 12: CPU detection may fail on Intel Sapphire Rapids processors CPU detection on Intel Sapphire Rapids processors relies on the existence of the `AVX512_VP2INTERSECT` feature. This feature has been removed from the GCC Toolset 12 version of GCC and, as a consequence, CPU detection may fail on Intel Sapphire Rapids processors.
Story Points: ---
Clone Of:
: 2150126 2150130 2150133 (view as bug list) Environment:
Last Closed: 2023-05-09 07:45:05 UTC Type: Bug
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: 2150126, 2150130, 2150133, 2150135    

Description Hongtao Liu 2022-11-10 15:45:44 UTC
__builtin_cpu_is("sapphirerapids") will fail on SPR with GTS12.0 since it relies on existence of AVX512_VP2INTERSECT which has been removed in the latest update of hardware.

We have upstream and backport the fix patch to GCC12 release branch
https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605277.html

But I'm afraid it's too later to the recent GTS12.0 DTS12.0 release. The fix will be in GTS12.1/GTS12.1 in May 2023, and there's a ~5 month gap where __builtin_cpu_is ("sapphirerapids") is failed on SPR.

Comment 10 Marek Polacek 2022-11-22 21:22:43 UTC
FWIW, I will apply the patch to RHEL 9.2 gcc 11 as well.

Comment 32 errata-xmlrpc 2023-05-09 07:45:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (gcc-toolset-12-gcc bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2023:2305