File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1- // skip-filecheck
21// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
32//@ unit-test: DestinationPropagation
43
@@ -8,6 +7,13 @@ fn id<T>(x: T) -> T {
87
98// EMIT_MIR dead_stores_79191.f.DestinationPropagation.after.mir
109fn f ( mut a : usize ) -> usize {
10+ // CHECK-LABEL: fn f(
11+ // CHECK: debug a => [[a:_.*]];
12+ // CHECK: debug b => [[b:_.*]];
13+ // CHECK: [[b]] = [[a]];
14+ // CHECK: [[a]] = const 5_usize;
15+ // CHECK: [[a]] = move [[b]];
16+ // CHECK: id::<usize>(move [[a]])
1117 let b = a;
1218 a = 5 ;
1319 a = b;
Original file line number Diff line number Diff line change 1- // skip-filecheck
21// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
32// This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates
43// that that pass enables this one to do more optimizations.
@@ -12,6 +11,13 @@ fn id<T>(x: T) -> T {
1211
1312// EMIT_MIR dead_stores_better.f.DestinationPropagation.after.mir
1413pub fn f ( mut a : usize ) -> usize {
14+ // CHECK-LABEL: fn f(
15+ // CHECK: debug a => [[a:_.*]];
16+ // CHECK: debug b => [[b:_.*]];
17+ // CHECK: [[b]] = [[a]];
18+ // CHECK: [[a]] = const 5_usize;
19+ // CHECK: [[a]] = move [[b]];
20+ // CHECK: id::<usize>(move [[a]])
1521 let b = a;
1622 a = 5 ;
1723 a = b;
You can’t perform that action at this time.
0 commit comments