]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/const_goto_storage.match_nested_if.ConstGoto.diff
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / mir-opt / const_goto_storage.match_nested_if.ConstGoto.diff
1 - // MIR for `match_nested_if` before ConstGoto
2 + // MIR for `match_nested_if` after ConstGoto
3
4 fn match_nested_if() -> bool {
5 let mut _0: bool;
6 let _1: bool;
7 - let mut _2: ();
8 - let mut _3: bool;
9 - let mut _4: bool;
10 - let mut _5: bool;
11 - let mut _6: bool;
12 + let mut _2: bool;
13 scope 1 {
14 debug val => _1;
15 }
16
17 bb0: {
18 StorageLive(_1);
19 StorageLive(_2);
20 - _2 = ();
21 - StorageLive(_3);
22 - StorageLive(_4);
23 - StorageLive(_5);
24 - StorageLive(_6);
25 - _6 = const true;
26 - switchInt(move _6) -> [0: bb2, otherwise: bb1];
27 + _2 = const true;
28 + switchInt(move _2) -> [0: bb2, otherwise: bb1];
29 }
30
31 bb1: {
32 - _5 = const true;
33 + StorageDead(_2);
34 + _1 = const true;
35 goto -> bb3;
36 }
37
38 bb2: {
39 - _5 = const false;
40 + StorageDead(_2);
41 + _1 = const false;
42 goto -> bb3;
43 }
44
45 bb3: {
46 - switchInt(move _5) -> [0: bb5, otherwise: bb4];
47 - }
48 -
49 - bb4: {
50 - StorageDead(_6);
51 - _4 = const true;
52 - goto -> bb6;
53 - }
54 -
55 - bb5: {
56 - StorageDead(_6);
57 - _4 = const false;
58 - goto -> bb6;
59 - }
60 -
61 - bb6: {
62 - switchInt(move _4) -> [0: bb8, otherwise: bb7];
63 - }
64 -
65 - bb7: {
66 - StorageDead(_5);
67 - _3 = const true;
68 - goto -> bb9;
69 - }
70 -
71 - bb8: {
72 - StorageDead(_5);
73 - _3 = const false;
74 - goto -> bb9;
75 - }
76 -
77 - bb9: {
78 - switchInt(move _3) -> [0: bb11, otherwise: bb10];
79 - }
80 -
81 - bb10: {
82 - StorageDead(_4);
83 - StorageDead(_3);
84 - _1 = const true;
85 - goto -> bb12;
86 - }
87 -
88 - bb11: {
89 - StorageDead(_4);
90 - StorageDead(_3);
91 - _1 = const false;
92 - goto -> bb12;
93 - }
94 -
95 - bb12: {
96 - StorageDead(_2);
97 _0 = _1;
98 StorageDead(_1);
99 return;
100 }
101 }
102