Skip to content

Commit bcc1d44

Browse files
committed
trivial test blessings
1 parent f991ff0 commit bcc1d44

8 files changed

+43
-46
lines changed

tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@
112112
StorageDead(_10);
113113
StorageLive(_14);
114114
_14 = const {ALLOC0: &&SmallStruct};
115-
_31 = deref_copy (*_14);
115+
_31 = copy (*_14);
116116
StorageLive(_11);
117-
_32 = deref_copy (*_14);
117+
_32 = copy (*_14);
118118
- _11 = copy ((*_32).0: f32);
119119
+ _11 = const 9f32;
120120
StorageLive(_12);
121-
_33 = deref_copy (*_14);
121+
_33 = copy (*_14);
122122
_12 = copy ((*_33).1: std::option::Option<S>);
123123
StorageLive(_13);
124-
_34 = deref_copy (*_14);
124+
_34 = copy (*_14);
125125
_13 = copy ((*_34).2: &[f32]);
126126
StorageDead(_14);
127127
StorageLive(_15);
@@ -149,16 +149,16 @@
149149
StorageDead(_22);
150150
StorageLive(_26);
151151
_26 = const {ALLOC1: &&BigStruct};
152-
_35 = deref_copy (*_26);
152+
_35 = copy (*_26);
153153
StorageLive(_23);
154-
_36 = deref_copy (*_26);
154+
_36 = copy (*_26);
155155
- _23 = copy ((*_36).0: f32);
156156
+ _23 = const 82f32;
157157
StorageLive(_24);
158-
_37 = deref_copy (*_26);
158+
_37 = copy (*_26);
159159
_24 = copy ((*_37).1: std::option::Option<S>);
160160
StorageLive(_25);
161-
_38 = deref_copy (*_26);
161+
_38 = copy (*_26);
162162
_25 = copy ((*_38).2: &[f32]);
163163
StorageDead(_26);
164164
StorageLive(_27);

tests/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.diff

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
_4 = (move _5, move _6);
7777
StorageDead(_6);
7878
StorageDead(_5);
79-
_34 = deref_copy (_4.0: &ViewportPercentageLength);
79+
_34 = copy (_4.0: &ViewportPercentageLength);
8080
_11 = discriminant((*_34));
8181
switchInt(move _11) -> [0: bb2, 1: bb3, 2: bb4, 3: bb5, otherwise: bb12];
8282
}
@@ -92,35 +92,35 @@
9292
}
9393

9494
bb2: {
95-
_35 = deref_copy (_4.1: &ViewportPercentageLength);
95+
_35 = copy (_4.1: &ViewportPercentageLength);
9696
_7 = discriminant((*_35));
9797
switchInt(move _7) -> [0: bb9, otherwise: bb1];
9898
}
9999

100100
bb3: {
101-
_36 = deref_copy (_4.1: &ViewportPercentageLength);
101+
_36 = copy (_4.1: &ViewportPercentageLength);
102102
_8 = discriminant((*_36));
103103
switchInt(move _8) -> [1: bb8, otherwise: bb1];
104104
}
105105

106106
bb4: {
107-
_37 = deref_copy (_4.1: &ViewportPercentageLength);
107+
_37 = copy (_4.1: &ViewportPercentageLength);
108108
_9 = discriminant((*_37));
109109
switchInt(move _9) -> [2: bb7, otherwise: bb1];
110110
}
111111

112112
bb5: {
113-
_38 = deref_copy (_4.1: &ViewportPercentageLength);
113+
_38 = copy (_4.1: &ViewportPercentageLength);
114114
_10 = discriminant((*_38));
115115
switchInt(move _10) -> [3: bb6, otherwise: bb1];
116116
}
117117

118118
bb6: {
119119
StorageLive(_27);
120-
_39 = deref_copy (_4.0: &ViewportPercentageLength);
120+
_39 = copy (_4.0: &ViewportPercentageLength);
121121
_27 = copy (((*_39) as Vmax).0: f32);
122122
StorageLive(_28);
123-
_40 = deref_copy (_4.1: &ViewportPercentageLength);
123+
_40 = copy (_4.1: &ViewportPercentageLength);
124124
_28 = copy (((*_40) as Vmax).0: f32);
125125
StorageLive(_29);
126126
StorageLive(_30);
@@ -139,10 +139,10 @@
139139

140140
bb7: {
141141
StorageLive(_22);
142-
_41 = deref_copy (_4.0: &ViewportPercentageLength);
142+
_41 = copy (_4.0: &ViewportPercentageLength);
143143
_22 = copy (((*_41) as Vmin).0: f32);
144144
StorageLive(_23);
145-
_42 = deref_copy (_4.1: &ViewportPercentageLength);
145+
_42 = copy (_4.1: &ViewportPercentageLength);
146146
_23 = copy (((*_42) as Vmin).0: f32);
147147
StorageLive(_24);
148148
StorageLive(_25);
@@ -161,10 +161,10 @@
161161

162162
bb8: {
163163
StorageLive(_17);
164-
_43 = deref_copy (_4.0: &ViewportPercentageLength);
164+
_43 = copy (_4.0: &ViewportPercentageLength);
165165
_17 = copy (((*_43) as Vh).0: f32);
166166
StorageLive(_18);
167-
_44 = deref_copy (_4.1: &ViewportPercentageLength);
167+
_44 = copy (_4.1: &ViewportPercentageLength);
168168
_18 = copy (((*_44) as Vh).0: f32);
169169
StorageLive(_19);
170170
StorageLive(_20);
@@ -183,10 +183,10 @@
183183

184184
bb9: {
185185
StorageLive(_12);
186-
_45 = deref_copy (_4.0: &ViewportPercentageLength);
186+
_45 = copy (_4.0: &ViewportPercentageLength);
187187
_12 = copy (((*_45) as Vw).0: f32);
188188
StorageLive(_13);
189-
_46 = deref_copy (_4.1: &ViewportPercentageLength);
189+
_46 = copy (_4.1: &ViewportPercentageLength);
190190
_13 = copy (((*_46) as Vw).0: f32);
191191
StorageLive(_14);
192192
StorageLive(_15);

tests/mir-opt/early_otherwise_branch_soundness.no_downcast.EarlyOtherwiseBranch.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717

1818
bb1: {
19-
_4 = deref_copy (((*_1) as Some).0: &E<'_>);
19+
_4 = copy (((*_1) as Some).0: &E<'_>);
2020
_2 = discriminant((*_4));
2121
switchInt(move _2) -> [1: bb2, 0: bb3, otherwise: bb5];
2222
}

tests/mir-opt/gvn_copy_aggregate.all_copy_2.GVN.diff

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@
2525

2626
bb0: {
2727
- StorageLive(_2);
28-
- _8 = deref_copy (*_1);
2928
+ nop;
30-
+ _8 = copy (*_1);
29+
_8 = copy (*_1);
3130
_2 = copy ((*_8).0: i32);
3231
- StorageLive(_3);
33-
- _9 = deref_copy (*_1);
32+
- _9 = copy (*_1);
3433
- _3 = copy ((*_9).1: u64);
3534
- StorageLive(_4);
36-
- _10 = deref_copy (*_1);
35+
- _10 = copy (*_1);
3736
- _4 = copy ((*_10).2: [i8; 3]);
3837
+ nop;
3938
+ _9 = copy _8;

tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
StorageLive(_8);
130130
_8 = move _4;
131131
StorageLive(_9);
132-
_10 = deref_copy (_1.1: &mut std::task::Context<'_>);
132+
_10 = copy (_1.1: &mut std::task::Context<'_>);
133133
_9 = &mut (*_10);
134134
- _7 = <{async fn body of ActionPermit<'_, T>::perform()} as Future>::poll(move _8, move _9) -> [return: bb3, unwind: bb5];
135135
+ StorageLive(_11);
@@ -150,7 +150,7 @@
150150
+ StorageLive(_40);
151151
+ StorageLive(_41);
152152
+ StorageLive(_42);
153-
+ _33 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
153+
+ _33 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
154154
+ _32 = discriminant((*_33));
155155
+ switchInt(move _32) -> [0: bb5, 1: bb15, 2: bb14, 3: bb13, otherwise: bb7];
156156
}
@@ -204,8 +204,8 @@
204204
- return;
205205
+ bb5: {
206206
+ _31 = move _9;
207-
+ _34 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
208-
+ _35 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
207+
+ _34 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
208+
+ _35 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
209209
+ (((*_34) as variant#3).0: ActionPermit<'_, T>) = move ((*_35).0: ActionPermit<'_, T>);
210210
+ StorageLive(_12);
211211
+ StorageLive(_13);
@@ -218,7 +218,7 @@
218218
+ StorageDead(_14);
219219
+ _12 = move _13;
220220
+ StorageDead(_13);
221-
+ _36 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
221+
+ _36 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
222222
+ (((*_36) as variant#3).1: std::future::Ready<()>) = move _12;
223223
+ goto -> bb6;
224224
}
@@ -231,7 +231,7 @@
231231
+ StorageLive(_19);
232232
+ StorageLive(_20);
233233
+ StorageLive(_21);
234-
+ _37 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
234+
+ _37 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
235235
+ _21 = &mut (((*_37) as variant#3).1: std::future::Ready<()>);
236236
+ _20 = &mut (*_21);
237237
+ _19 = Pin::<&mut std::future::Ready<()>> { pointer: copy _20 };
@@ -285,7 +285,7 @@
285285
+ StorageDead(_12);
286286
+ StorageDead(_28);
287287
+ StorageDead(_29);
288-
+ _38 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
288+
+ _38 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
289289
+ discriminant((*_38)) = 3;
290290
+ goto -> bb4;
291291
+ }
@@ -300,13 +300,13 @@
300300
+ StorageDead(_18);
301301
+ StorageDead(_17);
302302
+ StorageDead(_12);
303-
+ _39 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
303+
+ _39 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
304304
+ drop((((*_39) as variant#3).0: ActionPermit<'_, T>)) -> [return: bb10, unwind: bb12];
305305
+ }
306306
+
307307
+ bb10: {
308308
+ _7 = Poll::<()>::Ready(move _30);
309-
+ _40 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
309+
+ _40 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
310310
+ discriminant((*_40)) = 1;
311311
+ goto -> bb4;
312312
+ }
@@ -319,12 +319,12 @@
319319
+ StorageDead(_18);
320320
+ StorageDead(_17);
321321
+ StorageDead(_12);
322-
+ _41 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
322+
+ _41 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
323323
+ drop((((*_41) as variant#3).0: ActionPermit<'_, T>)) -> [return: bb12, unwind terminate(cleanup)];
324324
+ }
325325
+
326326
+ bb12 (cleanup): {
327-
+ _42 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
327+
+ _42 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
328328
+ discriminant((*_42)) = 2;
329329
+ goto -> bb2;
330330
+ }

tests/mir-opt/pre-codegen/deref_nested_borrows.src.GVN.panic-unwind.diff

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@
1616

1717
bb0: {
1818
- StorageLive(_2);
19-
- _6 = deref_copy (*_1);
2019
+ nop;
21-
+ _6 = copy (*_1);
20+
_6 = copy (*_1);
2221
_2 = copy (*_6);
2322
_3 = unknown() -> [return: bb1, unwind continue];
2423
}
2524

2625
bb1: {
2726
StorageLive(_4);
28-
- _7 = deref_copy (*_1);
29-
+ _7 = copy (*_1);
27+
_7 = copy (*_1);
3028
_4 = copy (*_7);
3129
StorageLive(_5);
3230
_5 = copy _2;

tests/mir-opt/retag.box_to_raw_mut.SimplifyCfg-pre-optimizations.after.panic-unwind.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn box_to_raw_mut(_1: &mut Box<i32>) -> *mut i32 {
88

99
bb0: {
1010
Retag([fn entry] _1);
11-
_2 = deref_copy (*_1);
11+
_2 = copy (*_1);
1212
_3 = copy ((_2.0: std::ptr::Unique<i32>).0: std::ptr::NonNull<i32>) as *const i32 (Transmute);
1313
_0 = &raw mut (*_3);
1414
Retag([raw] _0);

tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@
117117
StorageLive(_15);
118118
StorageLive(_16);
119119
StorageLive(_17);
120-
- _26 = deref_copy (_12.0: &std::boxed::Box<dyn std::fmt::Display>);
121-
+ _26 = deref_copy _34;
120+
- _26 = copy (_12.0: &std::boxed::Box<dyn std::fmt::Display>);
121+
+ _26 = copy _34;
122122
_17 = &(*_26);
123123
_16 = core::fmt::rt::Argument::<'_>::new_display::<Box<dyn std::fmt::Display>>(move _17) -> [return: bb3, unwind unreachable];
124124
}
@@ -127,8 +127,8 @@
127127
StorageDead(_17);
128128
StorageLive(_18);
129129
StorageLive(_19);
130-
- _27 = deref_copy (_12.1: &u32);
131-
+ _27 = deref_copy _35;
130+
- _27 = copy (_12.1: &u32);
131+
+ _27 = copy _35;
132132
_19 = &(*_27);
133133
_18 = core::fmt::rt::Argument::<'_>::new_display::<u32>(move _19) -> [return: bb4, unwind unreachable];
134134
}

0 commit comments

Comments
 (0)