diff options
author | zoecarver <z.zoelec2@gmail.com> | 2020-11-10 18:23:22 -0800 |
---|---|---|
committer | zoecarver <z.zoelec2@gmail.com> | 2020-11-10 18:23:22 -0800 |
commit | 31dfaff3b395a19f23bb1010bfcec67452efe02d (patch) | |
tree | 9632d2dae5626a188d1679328a9f3b4189f96374 /llvm/lib/CodeGen | |
parent | 4eb8359e742beac06f1594e64396256a8ecc30a3 (diff) | |
download | llvm-31dfaff3b395a19f23bb1010bfcec67452efe02d.zip llvm-31dfaff3b395a19f23bb1010bfcec67452efe02d.tar.gz llvm-31dfaff3b395a19f23bb1010bfcec67452efe02d.tar.bz2 |
[libc++] Change requirements on linear_congruential_engine.
This patch changes how linear_congruential_engine picks its randomization
algorithm. It adds two restrictions, `_OverflowOK` and `_SchrageOK`.
`_OverflowOK` means that m is a power of two so using the classic
`(a * x + c) % m` will create a meaningless overflow. The second checks
that Schrage's algorithm will produce results that are in bounds of min
and max. This patch fixes https://llvm.org/PR27839.
Differential Revision: D65041
Diffstat (limited to 'llvm/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions