diff options
| author | Elias Holzmann <9659253+EliasHolzmann@users.noreply.github.com> | 2024-03-03 05:17:55 +0100 |
|---|---|---|
| committer | Elias Holzmann <9659253+EliasHolzmann@users.noreply.github.com> | 2024-12-05 21:48:36 +0100 |
| commit | 31a56571091a9bdcc3fc9f4dff9e4fafeddc2ea8 (patch) | |
| tree | 117619552507aa46d9751f57936d98e6b2f1a6ec /tests | |
| parent | 2f9e0c984bd6c1a9e9acbc8478de2496a3ac481e (diff) | |
| download | rust-31a56571091a9bdcc3fc9f4dff9e4fafeddc2ea8.tar.gz rust-31a56571091a9bdcc3fc9f4dff9e4fafeddc2ea8.zip | |
Access members of `FormattingOptions` directly instead of via getters/setters
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mir-opt/funky_arms.float_to_exponential_common.GVN.panic-abort.diff | 147 | ||||
| -rw-r--r-- | tests/mir-opt/funky_arms.float_to_exponential_common.GVN.panic-unwind.diff | 147 |
2 files changed, 148 insertions, 146 deletions
diff --git a/tests/mir-opt/funky_arms.float_to_exponential_common.GVN.panic-abort.diff b/tests/mir-opt/funky_arms.float_to_exponential_common.GVN.panic-abort.diff index ed04bc7dd56..a1be927e1c0 100644 --- a/tests/mir-opt/funky_arms.float_to_exponential_common.GVN.panic-abort.diff +++ b/tests/mir-opt/funky_arms.float_to_exponential_common.GVN.panic-abort.diff @@ -7,133 +7,134 @@ debug upper => _3; let mut _0: std::result::Result<(), std::fmt::Error>; let _4: bool; - let mut _5: &std::fmt::Formatter<'_>; - let mut _7: std::option::Option<usize>; - let mut _8: isize; - let mut _10: &mut std::fmt::Formatter<'_>; - let mut _11: &T; - let mut _12: core::num::flt2dec::Sign; + 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: u32; - let mut _15: usize; - let mut _16: bool; - let mut _17: &mut std::fmt::Formatter<'_>; - let mut _18: &T; - let mut _19: core::num::flt2dec::Sign; - let mut _20: bool; + 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 { debug force_sign => _4; - let _6: core::num::flt2dec::Sign; + let _5: core::num::flt2dec::Sign; scope 2 { - debug sign => _6; + debug sign => _5; scope 3 { - debug precision => _9; - let _9: usize; - scope 4 (inlined Formatter::<'_>::precision) { - scope 5 (inlined FormattingOptions::get_precision) { - } + debug precision => _8; + let _8: usize; + scope 5 (inlined Formatter::<'_>::precision) { } } } } + scope 4 (inlined Formatter::<'_>::sign_plus) { + let mut _20: u32; + let mut _21: u32; + } bb0: { StorageLive(_4); + StorageLive(_20); + StorageLive(_21); + _21 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32); + _20 = BitAnd(move _21, const 1_u32); + StorageDead(_21); + _4 = Ne(move _20, const 0_u32); + StorageDead(_20); StorageLive(_5); - _5 = &(*_1); - _4 = Formatter::<'_>::sign_plus(move _5) -> [return: bb1, unwind unreachable]; + switchInt(copy _4) -> [0: bb2, otherwise: bb1]; } bb1: { - StorageDead(_5); - StorageLive(_6); - switchInt(copy _4) -> [0: bb3, otherwise: bb2]; +- _5 = MinusPlus; ++ _5 = const MinusPlus; + goto -> bb3; } bb2: { -- _6 = MinusPlus; -+ _6 = const MinusPlus; - goto -> bb4; +- _5 = core::num::flt2dec::Sign::Minus; ++ _5 = const core::num::flt2dec::Sign::Minus; + goto -> bb3; } bb3: { -- _6 = core::num::flt2dec::Sign::Minus; -+ _6 = const core::num::flt2dec::Sign::Minus; - goto -> bb4; + StorageLive(_6); + _6 = copy (((*_1).0: std::fmt::FormattingOptions).4: std::option::Option<usize>); + _7 = discriminant(_6); + switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb9]; } bb4: { - StorageLive(_7); - _7 = copy (((*_1).0: std::fmt::FormattingOptions).4: std::option::Option<usize>); - _8 = discriminant(_7); - switchInt(move _8) -> [1: bb5, 0: bb7, otherwise: bb10]; - } - - bb5: { -- StorageLive(_9); +- StorageLive(_8); + nop; - _9 = copy ((_7 as Some).0: usize); + _8 = copy ((_6 as Some).0: usize); + StorageLive(_9); + _9 = copy _1; StorageLive(_10); - _10 = copy _1; + _10 = copy _2; StorageLive(_11); - _11 = copy _2; + _11 = copy _5; StorageLive(_12); - _12 = copy _6; StorageLive(_13); StorageLive(_14); - StorageLive(_15); - _15 = copy _9; -- _14 = move _15 as u32 (IntToInt); -+ _14 = copy _9 as u32 (IntToInt); - StorageDead(_15); - _13 = Add(move _14, const 1_u32); + _14 = copy _8; +- _13 = move _14 as u32 (IntToInt); ++ _13 = copy _8 as u32 (IntToInt); StorageDead(_14); - StorageLive(_16); - _16 = copy _3; -- _0 = float_to_exponential_common_exact::<T>(move _10, move _11, move _12, move _13, move _16) -> [return: bb6, unwind unreachable]; -+ _0 = float_to_exponential_common_exact::<T>(copy _1, copy _2, move _12, move _13, copy _3) -> [return: bb6, unwind unreachable]; + _12 = Add(move _13, const 1_u32); + StorageDead(_13); + StorageLive(_15); + _15 = copy _3; +- _0 = float_to_exponential_common_exact::<T>(move _9, move _10, move _11, move _12, move _15) -> [return: bb5, unwind unreachable]; ++ _0 = float_to_exponential_common_exact::<T>(copy _1, copy _2, move _11, move _12, copy _3) -> [return: bb5, unwind unreachable]; } - bb6: { - StorageDead(_16); - StorageDead(_13); + bb5: { + StorageDead(_15); StorageDead(_12); StorageDead(_11); StorageDead(_10); -- StorageDead(_9); + StorageDead(_9); +- StorageDead(_8); + nop; - goto -> bb9; + goto -> bb8; } - bb7: { + bb6: { + StorageLive(_16); + _16 = copy _1; StorageLive(_17); - _17 = copy _1; + _17 = copy _2; StorageLive(_18); - _18 = copy _2; + _18 = copy _5; StorageLive(_19); - _19 = copy _6; - StorageLive(_20); - _20 = copy _3; -- _0 = float_to_exponential_common_shortest::<T>(move _17, move _18, move _19, move _20) -> [return: bb8, unwind unreachable]; -+ _0 = float_to_exponential_common_shortest::<T>(copy _1, copy _2, move _19, copy _3) -> [return: bb8, unwind unreachable]; + _19 = copy _3; +- _0 = float_to_exponential_common_shortest::<T>(move _16, move _17, move _18, move _19) -> [return: bb7, unwind unreachable]; ++ _0 = float_to_exponential_common_shortest::<T>(copy _1, copy _2, move _18, copy _3) -> [return: bb7, unwind unreachable]; } - bb8: { - StorageDead(_20); + bb7: { StorageDead(_19); StorageDead(_18); StorageDead(_17); - goto -> bb9; + StorageDead(_16); + goto -> bb8; } - bb9: { - StorageDead(_6); + bb8: { + StorageDead(_5); StorageDead(_4); - StorageDead(_7); + StorageDead(_6); return; } - bb10: { + bb9: { unreachable; } } diff --git a/tests/mir-opt/funky_arms.float_to_exponential_common.GVN.panic-unwind.diff b/tests/mir-opt/funky_arms.float_to_exponential_common.GVN.panic-unwind.diff index 33640bb2d8f..87ab71feb2f 100644 --- a/tests/mir-opt/funky_arms.float_to_exponential_common.GVN.panic-unwind.diff +++ b/tests/mir-opt/funky_arms.float_to_exponential_common.GVN.panic-unwind.diff @@ -7,133 +7,134 @@ debug upper => _3; let mut _0: std::result::Result<(), std::fmt::Error>; let _4: bool; - let mut _5: &std::fmt::Formatter<'_>; - let mut _7: std::option::Option<usize>; - let mut _8: isize; - let mut _10: &mut std::fmt::Formatter<'_>; - let mut _11: &T; - let mut _12: core::num::flt2dec::Sign; + 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: u32; - let mut _15: usize; - let mut _16: bool; - let mut _17: &mut std::fmt::Formatter<'_>; - let mut _18: &T; - let mut _19: core::num::flt2dec::Sign; - let mut _20: bool; + 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 { debug force_sign => _4; - let _6: core::num::flt2dec::Sign; + let _5: core::num::flt2dec::Sign; scope 2 { - debug sign => _6; + debug sign => _5; scope 3 { - debug precision => _9; - let _9: usize; - scope 4 (inlined Formatter::<'_>::precision) { - scope 5 (inlined FormattingOptions::get_precision) { - } + debug precision => _8; + let _8: usize; + scope 5 (inlined Formatter::<'_>::precision) { } } } } + scope 4 (inlined Formatter::<'_>::sign_plus) { + let mut _20: u32; + let mut _21: u32; + } bb0: { StorageLive(_4); + StorageLive(_20); + StorageLive(_21); + _21 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32); + _20 = BitAnd(move _21, const 1_u32); + StorageDead(_21); + _4 = Ne(move _20, const 0_u32); + StorageDead(_20); StorageLive(_5); - _5 = &(*_1); - _4 = Formatter::<'_>::sign_plus(move _5) -> [return: bb1, unwind continue]; + switchInt(copy _4) -> [0: bb2, otherwise: bb1]; } bb1: { - StorageDead(_5); - StorageLive(_6); - switchInt(copy _4) -> [0: bb3, otherwise: bb2]; +- _5 = MinusPlus; ++ _5 = const MinusPlus; + goto -> bb3; } bb2: { -- _6 = MinusPlus; -+ _6 = const MinusPlus; - goto -> bb4; +- _5 = core::num::flt2dec::Sign::Minus; ++ _5 = const core::num::flt2dec::Sign::Minus; + goto -> bb3; } bb3: { -- _6 = core::num::flt2dec::Sign::Minus; -+ _6 = const core::num::flt2dec::Sign::Minus; - goto -> bb4; + StorageLive(_6); + _6 = copy (((*_1).0: std::fmt::FormattingOptions).4: std::option::Option<usize>); + _7 = discriminant(_6); + switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb9]; } bb4: { - StorageLive(_7); - _7 = copy (((*_1).0: std::fmt::FormattingOptions).4: std::option::Option<usize>); - _8 = discriminant(_7); - switchInt(move _8) -> [1: bb5, 0: bb7, otherwise: bb10]; - } - - bb5: { -- StorageLive(_9); +- StorageLive(_8); + nop; - _9 = copy ((_7 as Some).0: usize); + _8 = copy ((_6 as Some).0: usize); + StorageLive(_9); + _9 = copy _1; StorageLive(_10); - _10 = copy _1; + _10 = copy _2; StorageLive(_11); - _11 = copy _2; + _11 = copy _5; StorageLive(_12); - _12 = copy _6; StorageLive(_13); StorageLive(_14); - StorageLive(_15); - _15 = copy _9; -- _14 = move _15 as u32 (IntToInt); -+ _14 = copy _9 as u32 (IntToInt); - StorageDead(_15); - _13 = Add(move _14, const 1_u32); + _14 = copy _8; +- _13 = move _14 as u32 (IntToInt); ++ _13 = copy _8 as u32 (IntToInt); StorageDead(_14); - StorageLive(_16); - _16 = copy _3; -- _0 = float_to_exponential_common_exact::<T>(move _10, move _11, move _12, move _13, move _16) -> [return: bb6, unwind continue]; -+ _0 = float_to_exponential_common_exact::<T>(copy _1, copy _2, move _12, move _13, copy _3) -> [return: bb6, unwind continue]; + _12 = Add(move _13, const 1_u32); + StorageDead(_13); + StorageLive(_15); + _15 = copy _3; +- _0 = float_to_exponential_common_exact::<T>(move _9, move _10, move _11, move _12, move _15) -> [return: bb5, unwind continue]; ++ _0 = float_to_exponential_common_exact::<T>(copy _1, copy _2, move _11, move _12, copy _3) -> [return: bb5, unwind continue]; } - bb6: { - StorageDead(_16); - StorageDead(_13); + bb5: { + StorageDead(_15); StorageDead(_12); StorageDead(_11); StorageDead(_10); -- StorageDead(_9); + StorageDead(_9); +- StorageDead(_8); + nop; - goto -> bb9; + goto -> bb8; } - bb7: { + bb6: { + StorageLive(_16); + _16 = copy _1; StorageLive(_17); - _17 = copy _1; + _17 = copy _2; StorageLive(_18); - _18 = copy _2; + _18 = copy _5; StorageLive(_19); - _19 = copy _6; - StorageLive(_20); - _20 = copy _3; -- _0 = float_to_exponential_common_shortest::<T>(move _17, move _18, move _19, move _20) -> [return: bb8, unwind continue]; -+ _0 = float_to_exponential_common_shortest::<T>(copy _1, copy _2, move _19, copy _3) -> [return: bb8, unwind continue]; + _19 = copy _3; +- _0 = float_to_exponential_common_shortest::<T>(move _16, move _17, move _18, move _19) -> [return: bb7, unwind continue]; ++ _0 = float_to_exponential_common_shortest::<T>(copy _1, copy _2, move _18, copy _3) -> [return: bb7, unwind continue]; } - bb8: { - StorageDead(_20); + bb7: { StorageDead(_19); StorageDead(_18); StorageDead(_17); - goto -> bb9; + StorageDead(_16); + goto -> bb8; } - bb9: { - StorageDead(_6); + bb8: { + StorageDead(_5); StorageDead(_4); - StorageDead(_7); + StorageDead(_6); return; } - bb10: { + bb9: { unreachable; } } |
