about summary refs log tree commit diff
path: root/tests/mir-opt/instsimplify
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2024-08-18 15:51:53 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2024-08-18 15:52:23 -0700
commit249a36ffbd577fc76153b7ad4cafd33607ee4ddc (patch)
treea79891cc428f6fd30a100242fae5066dee0c4533 /tests/mir-opt/instsimplify
parent32185decd6875d5a86374043c7cfa77682b98ba3 (diff)
downloadrust-249a36ffbd577fc76153b7ad4cafd33607ee4ddc.tar.gz
rust-249a36ffbd577fc76153b7ad4cafd33607ee4ddc.zip
Update mir-opt filechecks
Diffstat (limited to 'tests/mir-opt/instsimplify')
-rw-r--r--tests/mir-opt/instsimplify/casts.rs4
-rw-r--r--tests/mir-opt/instsimplify/ref_of_deref.rs8
-rw-r--r--tests/mir-opt/instsimplify/ub_check.rs2
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/mir-opt/instsimplify/casts.rs b/tests/mir-opt/instsimplify/casts.rs
index 24dbb67b42d..27308ee52bc 100644
--- a/tests/mir-opt/instsimplify/casts.rs
+++ b/tests/mir-opt/instsimplify/casts.rs
@@ -19,7 +19,7 @@ pub fn redundant<'a, 'b: 'a>(x: *const &'a u8) -> *const &'a u8 {
 // EMIT_MIR casts.roundtrip.InstSimplify-after-simplifycfg.diff
 pub fn roundtrip(x: *const u8) -> *const u8 {
     // CHECK-LABEL: fn roundtrip(
-    // CHECK: _4 = _1;
+    // CHECK: _4 = copy _1;
     // CHECK: _3 = move _4 as *mut u8 (PtrToPtr);
     // CHECK: _2 = move _3 as *const u8 (PtrToPtr);
     x as *mut u8 as *const u8
@@ -28,7 +28,7 @@ pub fn roundtrip(x: *const u8) -> *const u8 {
 // EMIT_MIR casts.roundtrip.InstSimplify-after-simplifycfg.diff
 pub fn cast_thin_via_aggregate(x: *const u8) -> *const () {
     // CHECK-LABEL: fn cast_thin_via_aggregate(
-    // CHECK: _2 = _1;
+    // CHECK: _2 = copy _1;
     // CHECK: _0 = move _2 as *const () (PtrToPtr);
     std::intrinsics::aggregate_raw_ptr(x, ())
 }
diff --git a/tests/mir-opt/instsimplify/ref_of_deref.rs b/tests/mir-opt/instsimplify/ref_of_deref.rs
index dc0f5f8198b..5ba9bafaea2 100644
--- a/tests/mir-opt/instsimplify/ref_of_deref.rs
+++ b/tests/mir-opt/instsimplify/ref_of_deref.rs
@@ -8,11 +8,11 @@
 // EMIT_MIR ref_of_deref.references.InstSimplify-after-simplifycfg.diff
 // CHECK-LABEL: references
 pub fn references(const_ref: &i32, mut_ref: &mut [i32]) {
-    // CHECK: _3 = _1;
+    // CHECK: _3 = copy _1;
     let _a = &*const_ref;
     // CHECK: _4 = &(*_2);
     let _b = &*mut_ref;
-    // CHECK: _5 = _2;
+    // CHECK: _5 = copy _2;
     let _c = &mut *mut_ref;
     // CHECK: _6 = &raw const (*_1);
     let _d = &raw const *const_ref;
@@ -31,10 +31,10 @@ pub unsafe fn pointers(const_ptr: *const [i32], mut_ptr: *mut i32) {
     let _b = &*mut_ptr;
     // CHECK: _5 = &mut (*_2);
     let _c = &mut *mut_ptr;
-    // CHECK: _6 = _1;
+    // CHECK: _6 = copy _1;
     let _d = &raw const *const_ptr;
     // CHECK: _7 = &raw const (*_2);
     let _e = &raw const *mut_ptr;
-    // CHECK: _8 = _2;
+    // CHECK: _8 = copy _2;
     let _f = &raw mut *mut_ptr;
 }
diff --git a/tests/mir-opt/instsimplify/ub_check.rs b/tests/mir-opt/instsimplify/ub_check.rs
index ee72511c132..b513f60dc7b 100644
--- a/tests/mir-opt/instsimplify/ub_check.rs
+++ b/tests/mir-opt/instsimplify/ub_check.rs
@@ -6,7 +6,7 @@ pub fn unwrap_unchecked(x: Option<i32>) -> i32 {
     // CHECK-LABEL: fn unwrap_unchecked(
     // CHECK-NOT: UbChecks()
     // CHECK: [[assume:_.*]] = const false;
-    // CHECK-NEXT: assume([[assume]]);
+    // CHECK-NEXT: assume(copy [[assume]]);
     // CHECK-NEXT: unreachable_unchecked::precondition_check
     unsafe { x.unwrap_unchecked() }
 }