From ff260c850c24a100fe5fa55d93fc6e4aef3b2186 Mon Sep 17 00:00:00 2001 From: Shunpoco Date: Sat, 4 Jan 2025 11:19:29 +0000 Subject: [PATCH] Add FileCheck to cycle.rs --- tests/mir-opt/copy-prop/cycle.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/mir-opt/copy-prop/cycle.rs b/tests/mir-opt/copy-prop/cycle.rs index 1c0c9eae7fea..9f8312cc8fcd 100644 --- a/tests/mir-opt/copy-prop/cycle.rs +++ b/tests/mir-opt/copy-prop/cycle.rs @@ -1,4 +1,3 @@ -// skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Tests that cyclic assignments don't hang CopyProp, and result in reasonable code. //@ test-mir-pass: CopyProp @@ -8,6 +7,18 @@ fn val() -> i32 { // EMIT_MIR cycle.main.CopyProp.diff fn main() { + // CHECK-LABEL: fn main( + // CHECK: debug x => [[x:_.*]]; + // CHECK: debug y => [[y:_.*]]; + // CHECK: debug z => [[y]]; + // CHECK-NOT: StorageLive([[y]]); + // CHECK: [[y]] = copy [[x]]; + // CHECK-NOT: StorageLive(_3); + // CHECK-NOT: _3 = copy [[y]]; + // CHECK-NOT: StorageLive(_4); + // CHECK-NOT: _4 = copy _3; + // CHECK-NOT: _1 = move _4; + // CHECK: [[x]] = copy [[y]]; let mut x = val(); let y = x; let z = y;