]>
Commit | Line | Data |
---|---|---|
1 | - // MIR for `noopt1` before EarlyOtherwiseBranch | |
2 | + // MIR for `noopt1` after EarlyOtherwiseBranch | |
3 | ||
4 | fn noopt1(_1: Option<u32>, _2: Option<u32>) -> u32 { | |
5 | debug x => _1; | |
6 | debug y => _2; | |
7 | let mut _0: u32; | |
8 | let mut _3: (std::option::Option<u32>, std::option::Option<u32>); | |
9 | let mut _4: std::option::Option<u32>; | |
10 | let mut _5: std::option::Option<u32>; | |
11 | let mut _6: isize; | |
12 | let mut _7: isize; | |
13 | let mut _8: isize; | |
14 | let _9: u32; | |
15 | let _10: u32; | |
16 | let _11: u32; | |
17 | let _12: u32; | |
18 | scope 1 { | |
19 | debug a => _9; | |
20 | debug b => _10; | |
21 | } | |
22 | scope 2 { | |
23 | debug a => _11; | |
24 | } | |
25 | scope 3 { | |
26 | debug b => _12; | |
27 | } | |
28 | ||
29 | bb0: { | |
30 | StorageLive(_3); | |
31 | StorageLive(_4); | |
32 | _4 = _1; | |
33 | StorageLive(_5); | |
34 | _5 = _2; | |
35 | _3 = (move _4, move _5); | |
36 | StorageDead(_5); | |
37 | StorageDead(_4); | |
38 | _8 = discriminant((_3.0: std::option::Option<u32>)); | |
39 | switchInt(move _8) -> [0: bb3, 1: bb2, otherwise: bb1]; | |
40 | } | |
41 | ||
42 | bb1: { | |
43 | unreachable; | |
44 | } | |
45 | ||
46 | bb2: { | |
47 | _6 = discriminant((_3.1: std::option::Option<u32>)); | |
48 | switchInt(move _6) -> [0: bb6, 1: bb5, otherwise: bb1]; | |
49 | } | |
50 | ||
51 | bb3: { | |
52 | _7 = discriminant((_3.1: std::option::Option<u32>)); | |
53 | switchInt(move _7) -> [0: bb4, 1: bb7, otherwise: bb1]; | |
54 | } | |
55 | ||
56 | bb4: { | |
57 | _0 = const 3_u32; | |
58 | goto -> bb8; | |
59 | } | |
60 | ||
61 | bb5: { | |
62 | StorageLive(_9); | |
63 | _9 = (((_3.0: std::option::Option<u32>) as Some).0: u32); | |
64 | StorageLive(_10); | |
65 | _10 = (((_3.1: std::option::Option<u32>) as Some).0: u32); | |
66 | _0 = const 0_u32; | |
67 | StorageDead(_10); | |
68 | StorageDead(_9); | |
69 | goto -> bb8; | |
70 | } | |
71 | ||
72 | bb6: { | |
73 | StorageLive(_11); | |
74 | _11 = (((_3.0: std::option::Option<u32>) as Some).0: u32); | |
75 | _0 = const 1_u32; | |
76 | StorageDead(_11); | |
77 | goto -> bb8; | |
78 | } | |
79 | ||
80 | bb7: { | |
81 | StorageLive(_12); | |
82 | _12 = (((_3.1: std::option::Option<u32>) as Some).0: u32); | |
83 | _0 = const 2_u32; | |
84 | StorageDead(_12); | |
85 | goto -> bb8; | |
86 | } | |
87 | ||
88 | bb8: { | |
89 | StorageDead(_3); | |
90 | return; | |
91 | } | |
92 | } | |
93 |