Landing: 770147194498

Project / Subsystem

gcc / gcc/libstdc++

Date

2026-06-30

Author

Yi Chen

Commit

770147194498eb1d3cec75397ab43e3a298f2774

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc/libstdc++
patch_id
commit_hash
770147194498eb1d3cec75397ab43e3a298f2774
source_type
github
headline
Add Hygon x86 RNG instructions to std::random_device
tldr
std::random_device now supports Hygon CPUs via RDRAND/RDSEED instructions.
author
Yi Chen
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • libstdc++
  • random
  • hardware
discussion_id_link
bugzilla_pr
date
2026-06-30T00:00:00.000Z

Libstdc++‘s std::random_device has been updated to recognize and utilize the Hygon x86 hardware random number generator (RNG) instructions, RDRAND and RDSEED. This brings Hygon C86 platforms in line with Intel and AMD, allowing them to use hardware-based randomness instead of falling back to a software RNG. The change involves adding the Hygon vendor signature to the allowlists for these instructions, with a default preference for RDRAND on Hygon for better throughput.