about summary refs log tree commit diff
path: root/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/dead-store-elimination/call_arg_copy.rs')
-rw-r--r--tests/mir-opt/dead-store-elimination/call_arg_copy.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
index 490a4aa502c..37b3313f7d0 100644
--- a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
+++ b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
@@ -1,6 +1,5 @@
-// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
-// unit-test: DeadStoreElimination
+// unit-test: DeadStoreElimination-final
 // compile-flags: -Zmir-enable-passes=+CopyProp
 
 #![feature(core_intrinsics)]
@@ -12,8 +11,10 @@ use std::intrinsics::mir::*;
 #[inline(never)]
 fn use_both(_: i32, _: i32) {}
 
-// EMIT_MIR call_arg_copy.move_simple.DeadStoreElimination.diff
+// EMIT_MIR call_arg_copy.move_simple.DeadStoreElimination-final.diff
 fn move_simple(x: i32) {
+    // CHECK-LABEL: fn move_simple(
+    // CHECK: = use_both(_1, move _1)
     use_both(x, x);
 }
 
@@ -23,11 +24,14 @@ struct Packed {
     y: i32,
 }
 
-// EMIT_MIR call_arg_copy.move_packed.DeadStoreElimination.diff
+// EMIT_MIR call_arg_copy.move_packed.DeadStoreElimination-final.diff
 #[custom_mir(dialect = "analysis")]
 fn move_packed(packed: Packed) {
+    // CHECK-LABEL: fn move_packed(
+    // CHECK: = use_both(const 0_i32, (_1.1: i32))
     mir!(
         {
+            // We have a packed struct, verify that the copy is not turned into a move.
             Call(RET = use_both(0, packed.y), ReturnTo(ret), UnwindContinue())
         }
         ret = {