From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- ...ics.unchecked.LowerIntrinsics.panic-unwind.diff | 154 +++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 tests/mir-opt/lower_intrinsics.unchecked.LowerIntrinsics.panic-unwind.diff (limited to 'tests/mir-opt/lower_intrinsics.unchecked.LowerIntrinsics.panic-unwind.diff') diff --git a/tests/mir-opt/lower_intrinsics.unchecked.LowerIntrinsics.panic-unwind.diff b/tests/mir-opt/lower_intrinsics.unchecked.LowerIntrinsics.panic-unwind.diff new file mode 100644 index 000000000..dd92b8d6d --- /dev/null +++ b/tests/mir-opt/lower_intrinsics.unchecked.LowerIntrinsics.panic-unwind.diff @@ -0,0 +1,154 @@ +- // MIR for `unchecked` before LowerIntrinsics ++ // MIR for `unchecked` after LowerIntrinsics + + fn unchecked(_1: i32, _2: i32) -> () { + debug a => _1; + debug b => _2; + let mut _0: (); + let _3: i32; + let mut _4: i32; + let mut _5: i32; + let mut _7: i32; + let mut _8: i32; + let mut _10: i32; + let mut _11: i32; + let mut _13: i32; + let mut _14: i32; + let mut _16: i32; + let mut _17: i32; + let mut _19: i32; + let mut _20: i32; + let mut _22: i32; + let mut _23: i32; + scope 1 { + debug _a => _3; + let _6: i32; + scope 2 { + debug _b => _6; + let _9: i32; + scope 3 { + debug _c => _9; + let _12: i32; + scope 4 { + debug _x => _12; + let _15: i32; + scope 5 { + debug _y => _15; + let _18: i32; + scope 6 { + debug _i => _18; + let _21: i32; + scope 7 { + debug _j => _21; + } + } + } + } + } + } + } + + bb0: { + StorageLive(_3); + StorageLive(_4); + _4 = _1; + StorageLive(_5); + _5 = _2; +- _3 = unchecked_add::(move _4, move _5) -> [return: bb1, unwind unreachable]; ++ _3 = AddUnchecked(move _4, move _5); ++ goto -> bb1; + } + + bb1: { + StorageDead(_5); + StorageDead(_4); + StorageLive(_6); + StorageLive(_7); + _7 = _1; + StorageLive(_8); + _8 = _2; +- _6 = unchecked_sub::(move _7, move _8) -> [return: bb2, unwind unreachable]; ++ _6 = SubUnchecked(move _7, move _8); ++ goto -> bb2; + } + + bb2: { + StorageDead(_8); + StorageDead(_7); + StorageLive(_9); + StorageLive(_10); + _10 = _1; + StorageLive(_11); + _11 = _2; +- _9 = unchecked_mul::(move _10, move _11) -> [return: bb3, unwind unreachable]; ++ _9 = MulUnchecked(move _10, move _11); ++ goto -> bb3; + } + + bb3: { + StorageDead(_11); + StorageDead(_10); + StorageLive(_12); + StorageLive(_13); + _13 = _1; + StorageLive(_14); + _14 = _2; +- _12 = unchecked_div::(move _13, move _14) -> [return: bb4, unwind unreachable]; ++ _12 = Div(move _13, move _14); ++ goto -> bb4; + } + + bb4: { + StorageDead(_14); + StorageDead(_13); + StorageLive(_15); + StorageLive(_16); + _16 = _1; + StorageLive(_17); + _17 = _2; +- _15 = unchecked_rem::(move _16, move _17) -> [return: bb5, unwind unreachable]; ++ _15 = Rem(move _16, move _17); ++ goto -> bb5; + } + + bb5: { + StorageDead(_17); + StorageDead(_16); + StorageLive(_18); + StorageLive(_19); + _19 = _1; + StorageLive(_20); + _20 = _2; +- _18 = unchecked_shl::(move _19, move _20) -> [return: bb6, unwind unreachable]; ++ _18 = ShlUnchecked(move _19, move _20); ++ goto -> bb6; + } + + bb6: { + StorageDead(_20); + StorageDead(_19); + StorageLive(_21); + StorageLive(_22); + _22 = _1; + StorageLive(_23); + _23 = _2; +- _21 = unchecked_shr::(move _22, move _23) -> [return: bb7, unwind unreachable]; ++ _21 = ShrUnchecked(move _22, move _23); ++ goto -> bb7; + } + + bb7: { + StorageDead(_23); + StorageDead(_22); + _0 = const (); + StorageDead(_21); + StorageDead(_18); + StorageDead(_15); + StorageDead(_12); + StorageDead(_9); + StorageDead(_6); + StorageDead(_3); + return; + } + } + -- cgit v1.2.3