Hardware Random Numbers

Hello,

Does LLVM support an intrinsic for hardware-based random number generators such as the one found in (https://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software-implementation-guide)?

Thanks,
Billy Moses
MIT '18
TJHSST '14

Hello,

Does LLVM support an intrinsic for hardware-based random number generators
such as the one found in
(IntelĀ® Digital Random Number Generator (DRNG) Software Implementation...)?

I'm not aware of a generic instrinsic, but you can use the intel
specific ones. e.g. @llvm.x86.rdrand will give you a rdrand
instruction.

You can look at the IR emitted by Clang when using Intel's
_rdrand32_step intrinsics for example code.

- Ben