Skip to content
Merged
Prev Previous commit
Next Next commit
Add FileCheck to dead_stores_79191.rs
  • Loading branch information
Shunpoco committed Oct 26, 2025
commit 109870df2c9cde6e342cd85b8d6a0d08fb3cf1df
9 changes: 8 additions & 1 deletion tests/mir-opt/copy-prop/dead_stores_79191.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ test-mir-pass: CopyProp

Expand All @@ -8,6 +7,14 @@ fn id<T>(x: T) -> T {

// EMIT_MIR dead_stores_79191.f.CopyProp.after.mir
fn f(mut a: usize) -> usize {
// CHECK-LABEL: fn f(
// CHECK: debug a => [[a:_.*]];
// CHECK: debug b => [[b:_.*]];
// CHECK: [[b]] = copy [[a]];
// CHECK: [[a]] = const 5_usize;
// CHECK: [[a]] = copy [[b]];
// CHECK: [[c:_.*]] = copy [[a]]
// CHECK: id::<usize>(move [[c]])
let b = a;
a = 5;
a = b;
Expand Down