about summary refs log tree commit diff
path: root/tests/mir-opt/pre-codegen/slice_index.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/pre-codegen/slice_index.rs')
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/mir-opt/pre-codegen/slice_index.rs b/tests/mir-opt/pre-codegen/slice_index.rs
index 6ddc4ad0220..574062d6c35 100644
--- a/tests/mir-opt/pre-codegen/slice_index.rs
+++ b/tests/mir-opt/pre-codegen/slice_index.rs
@@ -10,17 +10,17 @@ use std::ops::Range;
 pub fn slice_index_usize(slice: &[u32], index: usize) -> u32 {
     // CHECK-LABEL: slice_index_usize
     // CHECK: [[LEN:_[0-9]+]] = Len((*_1))
-    // CHECK: Lt(_2, [[LEN]])
+    // CHECK: Lt(copy _2, copy [[LEN]])
     // CHECK-NOT: precondition_check
-    // CHECK: _0 = (*_1)[_2];
+    // CHECK: _0 = copy (*_1)[_2];
     slice[index]
 }
 
 // EMIT_MIR slice_index.slice_get_mut_usize.PreCodegen.after.mir
 pub fn slice_get_mut_usize(slice: &mut [u32], index: usize) -> Option<&mut u32> {
     // CHECK-LABEL: slice_get_mut_usize
-    // CHECK: [[LEN:_[0-9]+]] = PtrMetadata(_1)
-    // CHECK: Lt(_2, move [[LEN]])
+    // CHECK: [[LEN:_[0-9]+]] = PtrMetadata(copy _1)
+    // CHECK: Lt(copy _2, move [[LEN]])
     // CHECK-NOT: precondition_check
     slice.get_mut(index)
 }
@@ -37,9 +37,9 @@ pub unsafe fn slice_get_unchecked_mut_range(slice: &mut [u32], index: Range<usiz
     // CHECK: [[START:_[0-9]+]] = move (_2.0: usize);
     // CHECK: [[END:_[0-9]+]] = move (_2.1: usize);
     // CHECK: precondition_check
-    // CHECK: [[LEN:_[0-9]+]] = SubUnchecked([[END]], [[START]]);
-    // CHECK: [[PTR:_[0-9]+]] = Offset({{_[0-9]+}}, [[START]]);
-    // CHECK: [[SLICE:_[0-9]+]] = *mut [u32] from ([[PTR]], [[LEN]])
+    // CHECK: [[LEN:_[0-9]+]] = SubUnchecked(copy [[END]], copy [[START]]);
+    // CHECK: [[PTR:_[0-9]+]] = Offset(copy {{_[0-9]+}}, copy [[START]]);
+    // CHECK: [[SLICE:_[0-9]+]] = *mut [u32] from (copy [[PTR]], copy [[LEN]])
     // CHECK: _0 = &mut (*[[SLICE]]);
     slice.get_unchecked_mut(index)
 }
@@ -53,8 +53,8 @@ pub unsafe fn slice_ptr_get_unchecked_range(
     // CHECK: [[START:_[0-9]+]] = move (_2.0: usize);
     // CHECK: [[END:_[0-9]+]] = move (_2.1: usize);
     // CHECK: precondition_check
-    // CHECK: [[LEN:_[0-9]+]] = SubUnchecked([[END]], [[START]]);
-    // CHECK: [[PTR:_[0-9]+]] = Offset({{_[0-9]+}}, [[START]]);
-    // CHECK: _0 = *const [u32] from ([[PTR]], [[LEN]])
+    // CHECK: [[LEN:_[0-9]+]] = SubUnchecked(copy [[END]], copy [[START]]);
+    // CHECK: [[PTR:_[0-9]+]] = Offset(copy {{_[0-9]+}}, copy [[START]]);
+    // CHECK: _0 = *const [u32] from (copy [[PTR]], copy [[LEN]])
     slice.get_unchecked(index)
 }