]> git.proxmox.com Git - rustc.git/blame - src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / mir-opt / simplify_try.try_identity.SimplifyLocals.after.mir
CommitLineData
ba9703b0
XL
1// MIR for `try_identity` after SimplifyLocals
2
6a06907d 3fn try_identity(_1: Result<u32, i32>) -> Result<u32, i32> {
064997fb
FG
4 debug x => _1; // in scope 0 at $DIR/simplify_try.rs:+0:17: +0:18
5 let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:+0:41: +0:57
6 let mut _2: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
7 let mut _3: isize; // in scope 0 at $DIR/simplify_try.rs:+2:9: +2:15
8 let _4: i32; // in scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
9 let mut _5: i32; // in scope 0 at $DIR/simplify_try.rs:+2:37: +2:50
10 let mut _6: i32; // in scope 0 at $DIR/simplify_try.rs:+2:48: +2:49
ba9703b0 11 scope 1 {
064997fb 12 debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:+1:9: +1:10
ba9703b0
XL
13 }
14 scope 2 {
064997fb 15 debug e => _4; // in scope 2 at $DIR/simplify_try.rs:+2:13: +2:14
17df50a5 16 scope 5 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:22:37: 22:50
923072b8 17 debug t => _6; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
ba9703b0 18 }
17df50a5 19 scope 6 (inlined from_error::<u32, i32>) { // at $DIR/simplify_try.rs:22:26: 22:51
f2b60f7d 20 debug e => _5; // in scope 6 at $DIR/simplify_try.rs:12:21: 12:22
ba9703b0
XL
21 }
22 }
17df50a5 23 scope 3 {
064997fb 24 debug v => ((_0 as Ok).0: u32); // in scope 3 at $DIR/simplify_try.rs:+3:12: +3:13
17df50a5
XL
25 }
26 scope 4 (inlined into_result::<u32, i32>) { // at $DIR/simplify_try.rs:21:19: 21:33
f2b60f7d 27 debug r => _2; // in scope 4 at $DIR/simplify_try.rs:8:22: 8:23
ba9703b0
XL
28 }
29
30 bb0: {
064997fb
FG
31 _2 = _1; // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
32 _3 = discriminant(_2); // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
f2b60f7d 33 switchInt(move _3) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify_try.rs:+1:13: +1:33
04454e1e
FG
34 }
35
36 bb1: {
064997fb
FG
37 ((_0 as Ok).0: u32) = ((_2 as Ok).0: u32); // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
38 Deinit(_0); // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
39 discriminant(_0) = 0; // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
40 return; // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
04454e1e
FG
41 }
42
43 bb2: {
f2b60f7d
FG
44 unreachable; // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
45 }
46
47 bb3: {
064997fb
FG
48 StorageLive(_4); // scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
49 StorageLive(_5); // scope 2 at $DIR/simplify_try.rs:+2:37: +2:50
50 StorageLive(_6); // scope 2 at $DIR/simplify_try.rs:+2:48: +2:49
51 StorageDead(_6); // scope 2 at $DIR/simplify_try.rs:+2:49: +2:50
f2b60f7d
FG
52 Deinit(_0); // scope 6 at $DIR/simplify_try.rs:13:5: 13:11
53 discriminant(_0) = 1; // scope 6 at $DIR/simplify_try.rs:13:5: 13:11
064997fb
FG
54 StorageDead(_5); // scope 2 at $DIR/simplify_try.rs:+2:50: +2:51
55 StorageDead(_4); // scope 0 at $DIR/simplify_try.rs:+2:50: +2:51
56 return; // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
ba9703b0
XL
57 }
58}