about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorChristopher Swenson <swenson@swenson.io>2022-01-10 14:18:28 -0800
committerChristopher Swenson <swenson@swenson.io>2022-01-10 14:18:28 -0800
commit424f38f211c23a9cf3d70a3bed17c30e79d49760 (patch)
tree81bdbe4a36c67f8c9560b7b077e150ef52f72e9c /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent89b9f7b284aacc5f8613438b80e4dd7bdd10549e (diff)
downloadrust-424f38f211c23a9cf3d70a3bed17c30e79d49760.tar.gz
rust-424f38f211c23a9cf3d70a3bed17c30e79d49760.zip
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