rust/tests/mir-opt/funky_arms.float_to_exponential_common.GVN.panic-unwind.diff

142 lines
3.9 KiB
Diff
Raw Normal View History

2023-09-20 16:43:33 -05:00
- // MIR for `float_to_exponential_common` before GVN
+ // MIR for `float_to_exponential_common` after GVN
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;
let mut _6: std::option::Option<usize>;
let mut _7: isize;
2023-09-20 16:43:33 -05:00
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;
scope 1 {
2023-06-06 08:47:00 -05:00
debug force_sign => _4;
let _5: core::num::flt2dec::Sign;
scope 2 {
debug sign => _5;
scope 3 {
debug precision => _8;
let _8: usize;
scope 5 (inlined Formatter::<'_>::precision) {
}
}
}
}
scope 4 (inlined Formatter::<'_>::sign_plus) {
2023-09-20 16:43:33 -05:00
let mut _20: u32;
let mut _21: u32;
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_4);
2023-09-20 16:43:33 -05:00
StorageLive(_20);
StorageLive(_21);
2024-08-18 16:26:34 -05:00
_21 = copy ((*_1).0: u32);
2023-09-20 16:43:33 -05:00
_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);
2024-08-18 16:26:34 -05:00
switchInt(copy _4) -> [0: bb2, otherwise: bb1];
}
bb1: {
2023-09-20 16:43:33 -05:00
- _5 = MinusPlus;
+ _5 = const MinusPlus;
goto -> bb3;
}
bb2: {
2023-09-20 16:43:33 -05:00
- _5 = Minus;
+ _5 = const Minus;
goto -> bb3;
}
bb3: {
StorageLive(_6);
2024-08-18 16:26:34 -05:00
_6 = copy ((*_1).4: std::option::Option<usize>);
_7 = discriminant(_6);
switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb9];
}
bb4: {
- StorageLive(_8);
+ nop;
2024-08-18 16:26:34 -05:00
_8 = copy ((_6 as Some).0: usize);
StorageLive(_9);
2024-08-18 16:26:34 -05:00
_9 = copy _1;
StorageLive(_10);
2024-08-18 16:26:34 -05:00
_10 = copy _2;
StorageLive(_11);
2024-08-18 16:26:34 -05:00
_11 = copy _5;
2023-09-20 16:43:33 -05:00
StorageLive(_12);
StorageLive(_13);
StorageLive(_14);
2024-08-18 16:26:34 -05:00
_14 = copy _8;
- _13 = move _14 as u32 (IntToInt);
2024-08-18 16:26:34 -05:00
+ _13 = copy _8 as u32 (IntToInt);
StorageDead(_14);
2023-09-20 16:43:33 -05:00
_12 = Add(move _13, const 1_u32);
StorageDead(_13);
StorageLive(_15);
2024-08-18 16:26:34 -05:00
_15 = copy _3;
- _0 = float_to_exponential_common_exact::<T>(move _9, move _10, move _11, move _12, move _15) -> [return: bb5, unwind continue];
2024-08-18 16:26:34 -05:00
+ _0 = float_to_exponential_common_exact::<T>(copy _1, copy _2, move _11, move _12, copy _3) -> [return: bb5, unwind continue];
}
bb5: {
StorageDead(_15);
2023-09-20 16:43:33 -05:00
StorageDead(_12);
StorageDead(_11);
StorageDead(_10);
StorageDead(_9);
- StorageDead(_8);
+ nop;
goto -> bb8;
}
bb6: {
StorageLive(_16);
2024-08-18 16:26:34 -05:00
_16 = copy _1;
StorageLive(_17);
2024-08-18 16:26:34 -05:00
_17 = copy _2;
2023-09-20 16:43:33 -05:00
StorageLive(_18);
2024-08-18 16:26:34 -05:00
_18 = copy _5;
StorageLive(_19);
2024-08-18 16:26:34 -05:00
_19 = copy _3;
- _0 = float_to_exponential_common_shortest::<T>(move _16, move _17, move _18, move _19) -> [return: bb7, unwind continue];
2024-08-18 16:26:34 -05:00
+ _0 = float_to_exponential_common_shortest::<T>(copy _1, copy _2, move _18, copy _3) -> [return: bb7, unwind continue];
}
bb7: {
StorageDead(_19);
2023-09-20 16:43:33 -05:00
StorageDead(_18);
StorageDead(_17);
StorageDead(_16);
goto -> bb8;
}
bb8: {
StorageDead(_5);
2023-06-06 08:47:00 -05:00
StorageDead(_4);
StorageDead(_6);
2023-06-06 08:47:00 -05:00
return;
}
bb9: {
unreachable;
}
}