Skip to content

Commit 1e19af5

Browse files
committed
Add FileCheck to cycle.rs
Signed-off-by: Shunpoco <tkngsnsk313320@gmail.com>
1 parent 7670ae1 commit 1e19af5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 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
//! Tests that cyclic assignments don't hang CopyProp, and result in reasonable code.
43
//@ test-mir-pass: CopyProp
@@ -8,6 +7,16 @@ fn val() -> i32 {
87

98
// EMIT_MIR cycle.main.CopyProp.diff
109
fn main() {
10+
// CHECK-LABEL: fn main(
11+
// CHECK: debug z => _2;
12+
// CHECK-NOT: StorageLive(_2);
13+
// CHECK: _2 = copy _1;
14+
// CHECK-NOT: StorageLive(_3);
15+
// CHECK-NOT: _3 = copy _2;
16+
// CHECK-NOT: StorageLive(_4);
17+
// CHECK-NOT: _4 = copy _3;
18+
// CHECK-NOT: _1 = move _4;
19+
// CHECK: _1 = copy _2;
1120
let mut x = val();
1221
let y = x;
1322
let z = y;

0 commit comments

Comments
 (0)