]> git.proxmox.com Git - rustc.git/blame - src/test/mir-opt/dest-prop/branch.main.DestinationPropagation.diff
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / mir-opt / dest-prop / branch.main.DestinationPropagation.diff
CommitLineData
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 {
10- debug x => _1; // in scope 1 at $DIR/branch.rs:13:9: 13:10
11+ debug x => _2; // in scope 1 at $DIR/branch.rs:13:9: 13:10
12 let _2: i32; // in scope 1 at $DIR/branch.rs:15:9: 15:10
13 scope 2 {
14 debug y => _2; // in scope 2 at $DIR/branch.rs:15:9: 15:10
15 }
16 }
17
18 bb0: {
19- StorageLive(_1); // scope 0 at $DIR/branch.rs:13:9: 13:10
20- _1 = val() -> bb1; // scope 0 at $DIR/branch.rs:13:13: 13:18
21+ nop; // scope 0 at $DIR/branch.rs:13:9: 13:10
22+ _2 = val() -> bb1; // scope 0 at $DIR/branch.rs:13:13: 13:18
23 // mir::Constant
24 // + span: $DIR/branch.rs:13:13: 13:16
25 // + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar(<ZST>)) }
26 }
27
28 bb1: {
29- StorageLive(_2); // scope 1 at $DIR/branch.rs:15:9: 15:10
30+ nop; // scope 1 at $DIR/branch.rs:15:9: 15:10
31 StorageLive(_3); // scope 1 at $DIR/branch.rs:15:16: 15:22
32 _3 = cond() -> bb2; // scope 1 at $DIR/branch.rs:15:16: 15:22
33 // mir::Constant
34 // + span: $DIR/branch.rs:15:16: 15:20
35 // + literal: Const { ty: fn() -> bool {cond}, val: Value(Scalar(<ZST>)) }
36 }
37
38 bb2: {
5869c6ff 39 switchInt(move _3) -> [false: bb4, otherwise: bb3]; // scope 1 at $DIR/branch.rs:15:13: 20:6
1b1a35ee
XL
40 }
41
42 bb3: {
5869c6ff
XL
43- _2 = _1; // scope 1 at $DIR/branch.rs:16:9: 16:10
44+ nop; // scope 1 at $DIR/branch.rs:16:9: 16:10
45 goto -> bb6; // scope 1 at $DIR/branch.rs:15:13: 20:6
46 }
47
48 bb4: {
1b1a35ee
XL
49 StorageLive(_4); // scope 1 at $DIR/branch.rs:18:9: 18:14
50 _4 = val() -> bb5; // scope 1 at $DIR/branch.rs:18:9: 18:14
51 // mir::Constant
52 // + span: $DIR/branch.rs:18:9: 18:12
53 // + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar(<ZST>)) }
54 }
55
1b1a35ee
XL
56 bb5: {
57 StorageDead(_4); // scope 1 at $DIR/branch.rs:18:14: 18:15
58- _2 = _1; // scope 1 at $DIR/branch.rs:19:9: 19:10
59+ nop; // scope 1 at $DIR/branch.rs:19:9: 19:10
60 goto -> bb6; // scope 1 at $DIR/branch.rs:15:13: 20:6
61 }
62
63 bb6: {
5869c6ff 64 StorageDead(_3); // scope 1 at $DIR/branch.rs:20:5: 20:6
1b1a35ee
XL
65 _0 = const (); // scope 0 at $DIR/branch.rs:12:11: 21:2
66- StorageDead(_2); // scope 1 at $DIR/branch.rs:21:1: 21:2
67- StorageDead(_1); // scope 0 at $DIR/branch.rs:21:1: 21:2
68+ nop; // scope 1 at $DIR/branch.rs:21:1: 21:2
69+ nop; // scope 0 at $DIR/branch.rs:21:1: 21:2
70 return; // scope 0 at $DIR/branch.rs:21:2: 21:2
71 }
72 }
73