2020-05-17 08:39:35 -05:00
|
|
|
- // MIR for `float_to_exponential_common` before ConstProp
|
|
|
|
+ // MIR for `float_to_exponential_common` after ConstProp
|
|
|
|
|
2022-09-11 07:37:55 -05:00
|
|
|
fn float_to_exponential_common(_1: &mut Formatter<'_>, _2: &T, _3: bool) -> Result<(), std::fmt::Error> {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug fmt => _1;
|
|
|
|
debug num => _2;
|
|
|
|
debug upper => _3;
|
|
|
|
let mut _0: std::result::Result<(), std::fmt::Error>;
|
|
|
|
let _4: bool;
|
2023-10-06 19:29:42 -05:00
|
|
|
let mut _6: std::option::Option<usize>;
|
|
|
|
let mut _7: isize;
|
|
|
|
let mut _9: &mut std::fmt::Formatter<'_>;
|
|
|
|
let mut _10: &T;
|
|
|
|
let mut _11: core::num::flt2dec::Sign;
|
|
|
|
let mut _12: u32;
|
|
|
|
let mut _13: u32;
|
|
|
|
let mut _14: usize;
|
|
|
|
let mut _15: bool;
|
|
|
|
let mut _16: &mut std::fmt::Formatter<'_>;
|
|
|
|
let mut _17: &T;
|
|
|
|
let mut _18: core::num::flt2dec::Sign;
|
|
|
|
let mut _19: bool;
|
2020-05-17 08:39:35 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug force_sign => _4;
|
2023-10-06 19:29:42 -05:00
|
|
|
let _5: core::num::flt2dec::Sign;
|
2020-05-17 08:39:35 -05:00
|
|
|
scope 2 {
|
2023-10-06 19:29:42 -05:00
|
|
|
debug sign => _5;
|
2020-05-17 08:39:35 -05:00
|
|
|
scope 3 {
|
2023-10-06 19:29:42 -05:00
|
|
|
debug precision => _8;
|
|
|
|
let _8: usize;
|
|
|
|
scope 5 (inlined Formatter::<'_>::precision) {
|
|
|
|
debug self => _1;
|
|
|
|
}
|
2020-05-17 08:39:35 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-10-06 19:29:42 -05:00
|
|
|
scope 4 (inlined Formatter::<'_>::sign_plus) {
|
|
|
|
debug self => _1;
|
|
|
|
let mut _20: u32;
|
|
|
|
let mut _21: u32;
|
|
|
|
}
|
2020-05-17 08:39:35 -05:00
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_4);
|
2023-10-06 19:29:42 -05:00
|
|
|
StorageLive(_20);
|
|
|
|
StorageLive(_21);
|
|
|
|
_21 = ((*_1).0: u32);
|
|
|
|
_20 = BitAnd(move _21, const 1_u32);
|
|
|
|
StorageDead(_21);
|
|
|
|
_4 = Ne(move _20, const 0_u32);
|
|
|
|
StorageDead(_20);
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_5);
|
2023-10-06 19:29:42 -05:00
|
|
|
switchInt(_4) -> [0: bb2, otherwise: bb1];
|
2020-05-17 08:39:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-10-06 19:29:42 -05:00
|
|
|
- _5 = MinusPlus;
|
|
|
|
+ _5 = const MinusPlus;
|
|
|
|
goto -> bb3;
|
2020-05-17 08:39:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-10-06 19:29:42 -05:00
|
|
|
- _5 = Minus;
|
|
|
|
+ _5 = const Minus;
|
|
|
|
goto -> bb3;
|
2020-05-17 08:39:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-10-06 19:29:42 -05:00
|
|
|
StorageLive(_6);
|
|
|
|
_6 = ((*_1).4: std::option::Option<usize>);
|
|
|
|
_7 = discriminant(_6);
|
|
|
|
switchInt(move _7) -> [1: bb4, otherwise: bb6];
|
2020-05-17 08:39:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2023-10-06 19:29:42 -05:00
|
|
|
_8 = ((_6 as Some).0: usize);
|
|
|
|
StorageLive(_11);
|
|
|
|
_11 = _5;
|
|
|
|
StorageLive(_12);
|
|
|
|
StorageLive(_13);
|
|
|
|
_13 = _8 as u32 (IntToInt);
|
|
|
|
_12 = Add(move _13, const 1_u32);
|
|
|
|
StorageDead(_13);
|
|
|
|
_0 = float_to_exponential_common_exact::<T>(_1, _2, move _11, move _12, _3) -> [return: bb5, unwind continue];
|
2020-05-17 08:39:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2023-10-06 19:29:42 -05:00
|
|
|
StorageDead(_12);
|
|
|
|
StorageDead(_11);
|
|
|
|
goto -> bb8;
|
2020-05-17 08:39:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
2023-10-06 19:29:42 -05:00
|
|
|
StorageLive(_18);
|
|
|
|
_18 = _5;
|
|
|
|
_0 = float_to_exponential_common_shortest::<T>(_1, _2, move _18, _3) -> [return: bb7, unwind continue];
|
2020-05-17 08:39:35 -05:00
|
|
|
}
|
|
|
|
|
2021-09-01 16:52:17 -05:00
|
|
|
bb7: {
|
2023-10-06 19:29:42 -05:00
|
|
|
StorageDead(_18);
|
|
|
|
goto -> bb8;
|
2020-05-17 08:39:35 -05:00
|
|
|
}
|
|
|
|
|
2021-09-01 16:52:17 -05:00
|
|
|
bb8: {
|
2023-10-06 19:29:42 -05:00
|
|
|
StorageDead(_5);
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_4);
|
2023-10-06 19:29:42 -05:00
|
|
|
StorageDead(_6);
|
2023-06-06 08:47:00 -05:00
|
|
|
return;
|
2020-05-17 08:39:35 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|