mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
fc555cd832
Also get `add nuw` from `uN::checked_add` When I was doing this for `checked_{sub,shl,shr}`, it was mentioned https://github.com/rust-lang/rust/pull/124114#issuecomment-2066173305 that it'd be worth trying for `checked_add` too. It makes a particularly-big difference for `x.checked_add(C)`, as doing this means that LLVM removes the intrinsic and does it as a normal `x <= MAX - C` instead. cc `@DianQK` who had commented about `checked_add` related to https://github.com/rust-lang/hashbrown/issues/509 before cc https://github.com/llvm/llvm-project/issues/80637 for how LLVM is unlikely to do this itself |
||
---|---|---|
.. | ||
alloc | ||
backtrace@72265bea21 | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@df3618d9f3 | ||
sysroot | ||
test | ||
unwind |