]> git.proxmox.com Git - rustc.git/blame - src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / mir-opt / simplify_arm.id.SimplifyArmIdentity.diff
CommitLineData
f9f354fc
XL
1- // MIR for `id` before SimplifyArmIdentity
2+ // MIR for `id` after SimplifyArmIdentity
3
1b1a35ee 4 fn id(_1: Option<u8>) -> Option<u8> {
064997fb
FG
5 debug o => _1; // in scope 0 at $DIR/simplify-arm.rs:+0:7: +0:8
6 let mut _0: std::option::Option<u8>; // return place in scope 0 at $DIR/simplify-arm.rs:+0:25: +0:35
7 let mut _2: isize; // in scope 0 at $DIR/simplify-arm.rs:+2:9: +2:16
8 let _3: u8; // in scope 0 at $DIR/simplify-arm.rs:+2:14: +2:15
9 let mut _4: u8; // in scope 0 at $DIR/simplify-arm.rs:+2:25: +2:26
f9f354fc 10 scope 1 {
064997fb 11 debug v => _3; // in scope 1 at $DIR/simplify-arm.rs:+2:14: +2:15
f9f354fc
XL
12 }
13
14 bb0: {
064997fb
FG
15 _2 = discriminant(_1); // scope 0 at $DIR/simplify-arm.rs:+1:11: +1:12
16 switchInt(move _2) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:+1:5: +1:12
f9f354fc
XL
17 }
18
19 bb1: {
064997fb
FG
20 Deinit(_0); // scope 0 at $DIR/simplify-arm.rs:+3:17: +3:21
21 discriminant(_0) = 0; // scope 0 at $DIR/simplify-arm.rs:+3:17: +3:21
22 goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:+3:17: +3:21
f9f354fc
XL
23 }
24
25 bb2: {
064997fb 26 unreachable; // scope 0 at $DIR/simplify-arm.rs:+1:11: +1:12
f9f354fc
XL
27 }
28
29 bb3: {
064997fb
FG
30 StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:+2:14: +2:15
31 _3 = ((_1 as Some).0: u8); // scope 0 at $DIR/simplify-arm.rs:+2:14: +2:15
32 StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:+2:25: +2:26
33 _4 = _3; // scope 1 at $DIR/simplify-arm.rs:+2:25: +2:26
34 Deinit(_0); // scope 1 at $DIR/simplify-arm.rs:+2:20: +2:27
35 ((_0 as Some).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:+2:20: +2:27
36 discriminant(_0) = 1; // scope 1 at $DIR/simplify-arm.rs:+2:20: +2:27
37 StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:+2:26: +2:27
38 StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:+2:26: +2:27
39 goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:+2:26: +2:27
f9f354fc
XL
40 }
41
42 bb4: {
064997fb 43 return; // scope 0 at $DIR/simplify-arm.rs:+5:2: +5:2
f9f354fc
XL
44 }
45 }
46