3ec4eeddef
There's no need for the `const_eval_select` dance here. And while I originally wrote the `.try_into().unwrap_unchecked()` implementation here, it's kinda a mess in MIR -- this new one is substantially simpler, as shown by the old one being above the inlining threshold but the new one being below it.
26 lines
571 B
Rust
26 lines
571 B
Rust
// MIR for `unchecked_shr_signed_bigger` after PreCodegen
|
|
|
|
fn unchecked_shr_signed_bigger(_1: i64, _2: u32) -> i64 {
|
|
debug a => _1;
|
|
debug b => _2;
|
|
let mut _0: i64;
|
|
scope 1 (inlined core::num::<impl i64>::unchecked_shr) {
|
|
debug self => _1;
|
|
debug rhs => _2;
|
|
let mut _3: i64;
|
|
scope 2 {
|
|
}
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_3);
|
|
_3 = _2 as i64 (IntToInt);
|
|
_0 = unchecked_shr::<i64>(_1, move _3) -> [return: bb1, unwind unreachable];
|
|
}
|
|
|
|
bb1: {
|
|
StorageDead(_3);
|
|
return;
|
|
}
|
|
}
|