Skip to content

Commit 0692090

Browse files
committed
Run filecheck on dest-prop/dead_stores_79191.rs and dead_stores_better.rs
1 parent 853311c commit 0692090

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

tests/mir-opt/dest-prop/dead_stores_79191.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
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
109
fn 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;

tests/mir-opt/dest-prop/dead_stores_better.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
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
1413
pub 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;

0 commit comments

Comments
 (0)