aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorzoecarver <z.zoelec2@gmail.com>2020-11-10 18:23:22 -0800
committerzoecarver <z.zoelec2@gmail.com>2020-11-10 18:23:22 -0800
commit31dfaff3b395a19f23bb1010bfcec67452efe02d (patch)
tree9632d2dae5626a188d1679328a9f3b4189f96374 /llvm/lib/CodeGen
parent4eb8359e742beac06f1594e64396256a8ecc30a3 (diff)
downloadllvm-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