]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / mir-opt / dataflow-const-prop / enum.statics.DataflowConstProp.32bit.diff
1 - // MIR for `statics` before DataflowConstProp
2 + // MIR for `statics` after DataflowConstProp
3
4 fn statics() -> () {
5 let mut _0: ();
6 let _1: E;
7 let mut _2: &E;
8 let mut _4: isize;
9 let mut _8: &&E;
10 let mut _10: isize;
11 scope 1 {
12 debug e => _1;
13 let _3: i32;
14 let _5: i32;
15 let _6: i32;
16 scope 2 {
17 debug x => _3;
18 let _7: &E;
19 scope 5 {
20 debug e => _7;
21 let _9: &i32;
22 let _11: &i32;
23 let _12: &i32;
24 scope 6 {
25 debug x => _9;
26 }
27 scope 7 {
28 debug x => _11;
29 }
30 scope 8 {
31 debug x => _12;
32 }
33 }
34 }
35 scope 3 {
36 debug x => _5;
37 }
38 scope 4 {
39 debug x => _6;
40 }
41 }
42
43 bb0: {
44 StorageLive(_1);
45 StorageLive(_2);
46 _2 = const {alloc1: &E};
47 _1 = (*_2);
48 StorageDead(_2);
49 StorageLive(_3);
50 - _4 = discriminant(_1);
51 - switchInt(move _4) -> [0: bb3, 1: bb1, otherwise: bb2];
52 + _4 = const 0_isize;
53 + switchInt(const 0_isize) -> [0: bb3, 1: bb1, otherwise: bb2];
54 }
55
56 bb1: {
57 StorageLive(_6);
58 _6 = ((_1 as V2).0: i32);
59 _3 = _6;
60 StorageDead(_6);
61 goto -> bb4;
62 }
63
64 bb2: {
65 unreachable;
66 }
67
68 bb3: {
69 StorageLive(_5);
70 - _5 = ((_1 as V1).0: i32);
71 - _3 = _5;
72 + _5 = const 0_i32;
73 + _3 = const 0_i32;
74 StorageDead(_5);
75 goto -> bb4;
76 }
77
78 bb4: {
79 StorageLive(_7);
80 StorageLive(_8);
81 _8 = const {alloc2: &&E};
82 _7 = (*_8);
83 StorageDead(_8);
84 StorageLive(_9);
85 _10 = discriminant((*_7));
86 switchInt(move _10) -> [0: bb6, 1: bb5, otherwise: bb2];
87 }
88
89 bb5: {
90 StorageLive(_12);
91 _12 = &(((*_7) as V2).0: i32);
92 _9 = &(*_12);
93 StorageDead(_12);
94 goto -> bb7;
95 }
96
97 bb6: {
98 StorageLive(_11);
99 _11 = &(((*_7) as V1).0: i32);
100 _9 = _11;
101 StorageDead(_11);
102 goto -> bb7;
103 }
104
105 bb7: {
106 _0 = const ();
107 StorageDead(_9);
108 StorageDead(_7);
109 StorageDead(_3);
110 StorageDead(_1);
111 return;
112 }
113 }
114
115 alloc2 (static: RC, size: 4, align: 4) {
116 ╾─alloc14─╼ │ ╾──╼
117 }
118
119 alloc14 (size: 8, align: 4) {
120 01 00 00 00 04 00 00 00 │ ........
121 }
122
123 alloc1 (static: statics::C, size: 8, align: 4) {
124 00 00 00 00 00 00 00 00 │ ........
125 }
126