about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-15 11:28:22 +0100
committerGitHub <noreply@github.com>2022-01-15 11:28:22 +0100
commitf511360fd29e426c4a24ebde038f5bfbfcf93f88 (patch)
treebdb41b553f0998d6a77ff21c7877a7546477b74b /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent38c22af0153cf8f920c01ef04493e8878401fd18 (diff)
parent0589cace8c943d40a60b7356d8c772baf2879cee (diff)
downloadrust-f511360fd29e426c4a24ebde038f5bfbfcf93f88.tar.gz
rust-f511360fd29e426c4a24ebde038f5bfbfcf93f88.zip
Rollup merge of #92747 - swenson:bignum-bit-length-optimization, r=scottmcm
Simplification of BigNum::bit_length

As indicated in the comment, the BigNum::bit_length function could be
optimized by using CLZ, which is often a single instruction instead a
loop.

I think the code is also simpler now without the loop.

I added some additional tests for Big8x3 and Big32x40 to ensure that
there were no regressions.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions