Skip to content

Commit f53476b

Browse files
committed
Add FileCheck to dead_stores_better.rs
Signed-off-by: Shunpoco <[email protected]>
1 parent 77d5711 commit f53476b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
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,14 @@ fn id<T>(x: T) -> T {
1211

1312
// EMIT_MIR dead_stores_better.f.CopyProp.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]] = copy [[a]];
18+
// CHECK: [[a]] = const 5_usize;
19+
// CHECK: [[a]] = copy [[b]];
20+
// CHECK: [[c:_.*]] = copy [[a]]
21+
// CHECK: id::<usize>(move [[c]])
1522
let b = a;
1623
a = 5;
1724
a = b;

0 commit comments

Comments
 (0)