summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/gvn.references.GVN.panic-unwind.diff
blob: 880e7913fa94c248e6d118d0db632477ee89e6b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
- // MIR for `references` before GVN
+ // MIR for `references` after GVN
  
  fn references(_1: impl Sized) -> () {
      debug x => _1;
      let mut _0: ();
      let _2: ();
      let mut _3: &impl Sized;
      let _4: ();
      let mut _5: &impl Sized;
      let _6: ();
      let mut _7: &mut impl Sized;
      let _8: ();
      let mut _9: &mut impl Sized;
      let _10: ();
      let mut _11: *const impl Sized;
      let _12: ();
      let mut _13: *const impl Sized;
      let _14: ();
      let mut _15: *mut impl Sized;
      let _16: ();
      let mut _17: *mut impl Sized;
      let _18: &mut impl Sized;
      let mut _20: S<&mut impl Sized>;
      let mut _21: &mut impl Sized;
      let _22: ();
      let mut _23: &impl Sized;
      let _24: ();
      let mut _25: &mut impl Sized;
      let _26: ();
      let mut _27: *const impl Sized;
      let _28: ();
      let mut _29: *mut impl Sized;
      scope 1 {
          debug r => _18;
          let _19: &mut impl Sized;
          scope 2 {
              debug s => _19;
          }
      }
  
      bb0: {
          StorageLive(_2);
          StorageLive(_3);
          _3 = &_1;
          _2 = opaque::<&impl Sized>(move _3) -> [return: bb1, unwind: bb14];
      }
  
      bb1: {
          StorageDead(_3);
          StorageDead(_2);
          StorageLive(_4);
          StorageLive(_5);
          _5 = &_1;
          _4 = opaque::<&impl Sized>(move _5) -> [return: bb2, unwind: bb14];
      }
  
      bb2: {
          StorageDead(_5);
          StorageDead(_4);
          StorageLive(_6);
          StorageLive(_7);
          _7 = &mut _1;
          _6 = opaque::<&mut impl Sized>(move _7) -> [return: bb3, unwind: bb14];
      }
  
      bb3: {
          StorageDead(_7);
          StorageDead(_6);
          StorageLive(_8);
          StorageLive(_9);
          _9 = &mut _1;
          _8 = opaque::<&mut impl Sized>(move _9) -> [return: bb4, unwind: bb14];
      }
  
      bb4: {
          StorageDead(_9);
          StorageDead(_8);
          StorageLive(_10);
          StorageLive(_11);
          _11 = &raw const _1;
          _10 = opaque::<*const impl Sized>(move _11) -> [return: bb5, unwind: bb14];
      }
  
      bb5: {
          StorageDead(_11);
          StorageDead(_10);
          StorageLive(_12);
          StorageLive(_13);
          _13 = &raw const _1;
          _12 = opaque::<*const impl Sized>(move _13) -> [return: bb6, unwind: bb14];
      }
  
      bb6: {
          StorageDead(_13);
          StorageDead(_12);
          StorageLive(_14);
          StorageLive(_15);
          _15 = &raw mut _1;
          _14 = opaque::<*mut impl Sized>(move _15) -> [return: bb7, unwind: bb14];
      }
  
      bb7: {
          StorageDead(_15);
          StorageDead(_14);
          StorageLive(_16);
          StorageLive(_17);
          _17 = &raw mut _1;
          _16 = opaque::<*mut impl Sized>(move _17) -> [return: bb8, unwind: bb14];
      }
  
      bb8: {
          StorageDead(_17);
          StorageDead(_16);
-         StorageLive(_18);
+         nop;
          _18 = &mut _1;
          StorageLive(_19);
          StorageLive(_20);
          StorageLive(_21);
-         _21 = move _18;
-         _20 = S::<&mut impl Sized>(move _21);
+         _21 = _18;
+         _20 = S::<&mut impl Sized>(_18);
          StorageDead(_21);
-         _19 = move (_20.0: &mut impl Sized);
+         _19 = _18;
          StorageDead(_20);
          StorageLive(_22);
          StorageLive(_23);
-         _23 = &(*_19);
+         _23 = &(*_18);
          _22 = opaque::<&impl Sized>(move _23) -> [return: bb9, unwind: bb14];
      }
  
      bb9: {
          StorageDead(_23);
          StorageDead(_22);
          StorageLive(_24);
          StorageLive(_25);
-         _25 = &mut (*_19);
+         _25 = &mut (*_18);
          _24 = opaque::<&mut impl Sized>(move _25) -> [return: bb10, unwind: bb14];
      }
  
      bb10: {
          StorageDead(_25);
          StorageDead(_24);
          StorageLive(_26);
          StorageLive(_27);
-         _27 = &raw const (*_19);
+         _27 = &raw const (*_18);
          _26 = opaque::<*const impl Sized>(move _27) -> [return: bb11, unwind: bb14];
      }
  
      bb11: {
          StorageDead(_27);
          StorageDead(_26);
          StorageLive(_28);
          StorageLive(_29);
-         _29 = &raw mut (*_19);
+         _29 = &raw mut (*_18);
          _28 = opaque::<*mut impl Sized>(move _29) -> [return: bb12, unwind: bb14];
      }
  
      bb12: {
          StorageDead(_29);
          StorageDead(_28);
          _0 = const ();
          StorageDead(_19);
-         StorageDead(_18);
+         nop;
          drop(_1) -> [return: bb13, unwind: bb15];
      }
  
      bb13: {
          return;
      }
  
      bb14 (cleanup): {
          drop(_1) -> [return: bb15, unwind terminate(cleanup)];
      }
  
      bb15 (cleanup): {
          resume;
      }
  }