]>
Commit | Line | Data |
---|---|---|
1b1a35ee XL |
1 | - // MIR for `main` before DestinationPropagation |
2 | + // MIR for `main` after DestinationPropagation | |
3 | ||
4 | fn main() -> () { | |
5 | let mut _0: (); // return place in scope 0 at $DIR/branch.rs:12:11: 12:11 | |
6 | let _1: i32; // in scope 0 at $DIR/branch.rs:13:9: 13:10 | |
7 | let mut _3: bool; // in scope 0 at $DIR/branch.rs:15:16: 15:22 | |
8 | let _4: i32; // in scope 0 at $DIR/branch.rs:18:9: 18:14 | |
9 | scope 1 { | |
923072b8 | 10 | debug x => _1; // in scope 1 at $DIR/branch.rs:13:9: 13:10 |
1b1a35ee XL |
11 | let _2: i32; // in scope 1 at $DIR/branch.rs:15:9: 15:10 |
12 | scope 2 { | |
13 | debug y => _2; // in scope 2 at $DIR/branch.rs:15:9: 15:10 | |
14 | } | |
15 | } | |
16 | ||
17 | bb0: { | |
923072b8 FG |
18 | StorageLive(_1); // scope 0 at $DIR/branch.rs:13:9: 13:10 |
19 | _1 = val() -> bb1; // scope 0 at $DIR/branch.rs:13:13: 13:18 | |
1b1a35ee XL |
20 | // mir::Constant |
21 | // + span: $DIR/branch.rs:13:13: 13:16 | |
22 | // + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar(<ZST>)) } | |
23 | } | |
24 | ||
25 | bb1: { | |
923072b8 | 26 | StorageLive(_2); // scope 1 at $DIR/branch.rs:15:9: 15:10 |
1b1a35ee XL |
27 | StorageLive(_3); // scope 1 at $DIR/branch.rs:15:16: 15:22 |
28 | _3 = cond() -> bb2; // scope 1 at $DIR/branch.rs:15:16: 15:22 | |
29 | // mir::Constant | |
30 | // + span: $DIR/branch.rs:15:16: 15:20 | |
31 | // + literal: Const { ty: fn() -> bool {cond}, val: Value(Scalar(<ZST>)) } | |
32 | } | |
33 | ||
34 | bb2: { | |
94222f64 | 35 | switchInt(move _3) -> [false: bb4, otherwise: bb3]; // scope 1 at $DIR/branch.rs:15:16: 15:22 |
1b1a35ee XL |
36 | } |
37 | ||
38 | bb3: { | |
923072b8 | 39 | nop; // scope 1 at $DIR/branch.rs:16:9: 16:10 |
5869c6ff XL |
40 | goto -> bb6; // scope 1 at $DIR/branch.rs:15:13: 20:6 |
41 | } | |
42 | ||
43 | bb4: { | |
1b1a35ee XL |
44 | StorageLive(_4); // scope 1 at $DIR/branch.rs:18:9: 18:14 |
45 | _4 = val() -> bb5; // scope 1 at $DIR/branch.rs:18:9: 18:14 | |
46 | // mir::Constant | |
47 | // + span: $DIR/branch.rs:18:9: 18:12 | |
48 | // + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar(<ZST>)) } | |
49 | } | |
50 | ||
1b1a35ee XL |
51 | bb5: { |
52 | StorageDead(_4); // scope 1 at $DIR/branch.rs:18:14: 18:15 | |
923072b8 | 53 | nop; // scope 1 at $DIR/branch.rs:19:9: 19:10 |
1b1a35ee XL |
54 | goto -> bb6; // scope 1 at $DIR/branch.rs:15:13: 20:6 |
55 | } | |
56 | ||
57 | bb6: { | |
5869c6ff | 58 | StorageDead(_3); // scope 1 at $DIR/branch.rs:20:5: 20:6 |
cdc7bbd5 | 59 | nop; // scope 0 at $DIR/branch.rs:12:11: 21:2 |
923072b8 FG |
60 | StorageDead(_2); // scope 1 at $DIR/branch.rs:21:1: 21:2 |
61 | StorageDead(_1); // scope 0 at $DIR/branch.rs:21:1: 21:2 | |
1b1a35ee XL |
62 | return; // scope 0 at $DIR/branch.rs:21:2: 21:2 |
63 | } | |
64 | } | |
65 |