File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 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,18 @@ fn val() -> i32 {
87
98// EMIT_MIR cycle.main.CopyProp.diff
109fn main ( ) {
10+ // CHECK-LABEL: fn main(
11+ // CHECK: debug x => [[x:_.*]];
12+ // CHECK: debug y => [[y:_.*]];
13+ // CHECK: debug z => [[y]];
14+ // CHECK-NOT: StorageLive([[y]]);
15+ // CHECK: [[y]] = copy [[x]];
16+ // CHECK-NOT: StorageLive(_3);
17+ // CHECK-NOT: _3 = copy [[y]];
18+ // CHECK-NOT: StorageLive(_4);
19+ // CHECK-NOT: _4 = copy _3;
20+ // CHECK-NOT: _1 = move _4;
21+ // CHECK: [[x]] = copy [[y]];
1122 let mut x = val ( ) ;
1223 let y = x;
1324 let z = y;
You can’t perform that action at this time.
0 commit comments