Skip to content

Commit 03951f8

Browse files
committed
Add FileCheck to calls.rs
Signed-off-by: Shunpoco <tkngsnsk313320@gmail.com>
1 parent 1ff91e4 commit 03951f8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// skip-filecheck
21
// Check that CopyProp does propagate return values of call terminators.
32
//@ test-mir-pass: CopyProp
43
//@ needs-unwind
@@ -13,13 +12,22 @@ fn dummy(x: u8) -> u8 {
1312

1413
// EMIT_MIR calls.nrvo.CopyProp.diff
1514
fn nrvo() -> u8 {
15+
// CHECK-LABEL: fn nrvo(
16+
// CHECK: debug y => _0;
17+
// CHECK-NOT: StorageLive(_1);
18+
// CHECK-NOT: _1 = dummy(const 5_u8)
19+
// CHECK-NOT: _0 = copy _1;
20+
// CHECK-NOT: StorageDead(_1);
1621
let y = dummy(5); // this should get NRVO
1722
y
1823
}
1924

2025
// EMIT_MIR calls.multiple_edges.CopyProp.diff
2126
#[custom_mir(dialect = "runtime", phase = "initial")]
2227
fn multiple_edges(t: bool) -> u8 {
28+
// CHECK-LABEL: fn multiple_edges(
29+
// CHECK: bb2: {
30+
// CHECK: _0 = copy _2;
2331
mir! {
2432
let x: u8;
2533
{

0 commit comments

Comments
 (0)