diff options
| author | Christopher Swenson <swenson@swenson.io> | 2022-01-10 14:18:28 -0800 |
|---|---|---|
| committer | Christopher Swenson <swenson@swenson.io> | 2022-01-10 14:18:28 -0800 |
| commit | 424f38f211c23a9cf3d70a3bed17c30e79d49760 (patch) | |
| tree | 81bdbe4a36c67f8c9560b7b077e150ef52f72e9c /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 89b9f7b284aacc5f8613438b80e4dd7bdd10549e (diff) | |
| download | rust-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
