about summary refs log tree commit diff
path: root/tests/mir-opt/const_prop
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/const_prop
parent32185decd6875d5a86374043c7cfa77682b98ba3 (diff)
downloadrust-249a36ffbd577fc76153b7ad4cafd33607ee4ddc.tar.gz
rust-249a36ffbd577fc76153b7ad4cafd33607ee4ddc.zip
Update mir-opt filechecks
Diffstat (limited to 'tests/mir-opt/const_prop')
-rw-r--r--tests/mir-opt/const_prop/address_of_pair.rs4
-rw-r--r--tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs2
-rw-r--r--tests/mir-opt/const_prop/boxes.rs4
-rw-r--r--tests/mir-opt/const_prop/indirect_mutation.rs4
-rw-r--r--tests/mir-opt/const_prop/mutable_variable.rs2
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate.rs2
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs2
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs2
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_no_prop.rs4
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs6
-rw-r--r--tests/mir-opt/const_prop/overwrite_with_const_with_params.rs2
-rw-r--r--tests/mir-opt/const_prop/pointer_expose_provenance.rs2
-rw-r--r--tests/mir-opt/const_prop/slice_len.rs2
13 files changed, 19 insertions, 19 deletions
diff --git a/tests/mir-opt/const_prop/address_of_pair.rs b/tests/mir-opt/const_prop/address_of_pair.rs
index 9acaaa0ccaf..df1ab229d6e 100644
--- a/tests/mir-opt/const_prop/address_of_pair.rs
+++ b/tests/mir-opt/const_prop/address_of_pair.rs
@@ -10,13 +10,13 @@ pub fn fn0() -> bool {
     // CHECK: (*[[ptr]]) = const true;
     // CHECK-NOT: = const false;
     // CHECK-NOT: = const true;
-    // CHECK: [[tmp:_.*]] = ([[pair]].1: bool);
+    // CHECK: [[tmp:_.*]] = copy ([[pair]].1: bool);
     // CHECK-NOT: = const false;
     // CHECK-NOT: = const true;
     // CHECK: [[ret]] = Not(move [[tmp]]);
     // CHECK-NOT: = const false;
     // CHECK-NOT: = const true;
-    // CHECK: _0 = [[ret]];
+    // CHECK: _0 = copy [[ret]];
     let mut pair = (1, false);
     let ptr = core::ptr::addr_of_mut!(pair.1);
     pair = (1, false);
diff --git a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
index 0f8d278535d..139d0fa2e0f 100644
--- a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
+++ b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
@@ -8,7 +8,7 @@ fn main() {
     // CHECK-LABEL: fn main(
     // CHECK: debug a => [[a:_.*]];
     // CHECK: debug _b => [[b:_.*]];
-    // CHECK: [[b]] = (*[[a]])[3 of 4];
+    // CHECK: [[b]] = copy (*[[a]])[3 of 4];
     let a: *const [_] = &[1, 2, 3];
     unsafe {
         let _b = (*a)[3];
diff --git a/tests/mir-opt/const_prop/boxes.rs b/tests/mir-opt/const_prop/boxes.rs
index 7813352261e..f04db260e27 100644
--- a/tests/mir-opt/const_prop/boxes.rs
+++ b/tests/mir-opt/const_prop/boxes.rs
@@ -11,8 +11,8 @@ fn main() {
     // CHECK-LABEL: fn main(
     // CHECK: debug x => [[x:_.*]];
     // CHECK: (*{{_.*}}) = const 42_i32;
-    // CHECK: [[tmp:_.*]] = (*{{_.*}});
-    // CHECK: [[x]] = [[tmp]];
+    // CHECK: [[tmp:_.*]] = copy (*{{_.*}});
+    // CHECK: [[x]] = copy [[tmp]];
     let x = *(#[rustc_box]
     Box::new(42))
         + 0;
diff --git a/tests/mir-opt/const_prop/indirect_mutation.rs b/tests/mir-opt/const_prop/indirect_mutation.rs
index 32ff8f142b1..0a4c455c76e 100644
--- a/tests/mir-opt/const_prop/indirect_mutation.rs
+++ b/tests/mir-opt/const_prop/indirect_mutation.rs
@@ -10,7 +10,7 @@ fn foo() {
     // CHECK: _1 = const (1_i32,);
     // CHECK: _2 = &mut (_1.0: i32);
     // CHECK: (*_2) = const 5_i32;
-    // CHECK: _4 = (_1.0: i32);
+    // CHECK: _4 = copy (_1.0: i32);
     // CHECK: _3 = Eq(move _4, const 5_i32);
 
     let mut u = (1,);
@@ -25,7 +25,7 @@ fn bar() {
     // CHECK: debug y => _4;
     // CHECK: _3 = &raw mut (_1.0: i32);
     // CHECK: (*_3) = const 5_i32;
-    // CHECK: _5 = (_1.0: i32);
+    // CHECK: _5 = copy (_1.0: i32);
     // CHECK: _4 = Eq(move _5, const 5_i32);
 
     let mut v = (1,);
diff --git a/tests/mir-opt/const_prop/mutable_variable.rs b/tests/mir-opt/const_prop/mutable_variable.rs
index 9698fba6a11..3aa1b1bcd21 100644
--- a/tests/mir-opt/const_prop/mutable_variable.rs
+++ b/tests/mir-opt/const_prop/mutable_variable.rs
@@ -7,7 +7,7 @@ fn main() {
     // CHECK: debug y => [[y:_.*]];
     // CHECK: [[x]] = const 42_i32;
     // CHECK: [[x]] = const 99_i32;
-    // CHECK: [[y]] = [[x]];
+    // CHECK: [[y]] = copy [[x]];
     let mut x = 42;
     x = 99;
     let y = x;
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
index 80cd75215c1..bb8bf7f7164 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
@@ -8,7 +8,7 @@ fn main() {
     // CHECK: debug y => [[y:_.*]];
     // CHECK: [[x]] = const (42_i32, 43_i32);
     // CHECK: ([[x]].1: i32) = const 99_i32;
-    // CHECK: [[y]] = [[x]];
+    // CHECK: [[y]] = copy [[x]];
     let mut x = (42, 43);
     x.1 = 99;
     let y = x;
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
index 856afd53ab4..332cac96f75 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
@@ -10,7 +10,7 @@ fn main() {
     // CHECK: [[x]] = const (42_i32, 43_i32);
     // CHECK: [[z]] = &mut [[x]];
     // CHECK: ((*[[z]]).1: i32) = const 99_i32;
-    // CHECK: [[y]] = [[x]];
+    // CHECK: [[y]] = copy [[x]];
     let mut x = (42, 43);
     let z = &mut x;
     z.1 = 99;
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
index 6f99e6be246..e27437a1c75 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
@@ -9,7 +9,7 @@ fn main() {
     // CHECK: [[x]] = foo()
     // CHECK: ([[x]].1: i32) = const 99_i32;
     // CHECK: ([[x]].0: i32) = const 42_i32;
-    // CHECK: [[y]] = ([[x]].1: i32);
+    // CHECK: [[y]] = copy ([[x]].1: i32);
     let mut x: (i32, i32) = foo();
     x.1 = 99;
     x.0 = 42;
diff --git a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
index 8289832f81e..66af5bf1d5d 100644
--- a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
@@ -9,9 +9,9 @@ fn main() {
     // CHECK: debug x => [[x:_.*]];
     // CHECK: debug y => [[y:_.*]];
     // CHECK: [[x]] = const 42_u32;
-    // CHECK: [[tmp:_.*]] = (*{{_.*}});
+    // CHECK: [[tmp:_.*]] = copy (*{{_.*}});
     // CHECK: [[x]] = move [[tmp]];
-    // CHECK: [[y]] = [[x]];
+    // CHECK: [[y]] = copy [[x]];
     let mut x = 42;
     unsafe {
         x = STATIC;
diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
index 2c6cc0db6b2..1f4421331bc 100644
--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
@@ -11,9 +11,9 @@ fn main() {
     // CHECK: debug z => [[z:_.*]];
     // CHECK: [[a]] = foo()
     // CHECK: [[x]] = const (1_i32, 2_i32);
-    // CHECK: ([[x]].1: i32) = [[a]];
-    // CHECK: [[y]] = ([[x]].1: i32);
-    // CHECK: [[z]] = ([[x]].0: i32);
+    // CHECK: ([[x]].1: i32) = copy [[a]];
+    // CHECK: [[y]] = copy ([[x]].1: i32);
+    // CHECK: [[z]] = copy ([[x]].0: i32);
     let a = foo();
     let mut x: (i32, i32) = (1, 2);
     x.1 = a;
diff --git a/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs b/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs
index a43558223fe..1d8890bf369 100644
--- a/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs
+++ b/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs
@@ -15,7 +15,7 @@ fn size_of<T>() -> usize {
     // CHECK-LABEL: fn size_of(
     // CHECK: _1 = const 0_usize;
     // CHECK-NEXT: _1 = const SizeOfConst::<T>::SIZE;
-    // CHECK-NEXT: _0 = _1;
+    // CHECK-NEXT: _0 = copy _1;
     let mut a = 0;
     a = SizeOfConst::<T>::SIZE;
     a
diff --git a/tests/mir-opt/const_prop/pointer_expose_provenance.rs b/tests/mir-opt/const_prop/pointer_expose_provenance.rs
index a76fead9859..bee8a985f8f 100644
--- a/tests/mir-opt/const_prop/pointer_expose_provenance.rs
+++ b/tests/mir-opt/const_prop/pointer_expose_provenance.rs
@@ -10,7 +10,7 @@ fn main() {
     // CHECK: [[ptr:_.*]] = const main::FOO;
     // CHECK: [[ref:_.*]] = &raw const (*[[ptr]]);
     // CHECK: [[x:_.*]] = move [[ref]] as usize (PointerExposeProvenance);
-    // CHECK: = read([[x]])
+    // CHECK: = read(copy [[x]])
     const FOO: &i32 = &1;
     let x = FOO as *const i32 as usize;
     read(x);
diff --git a/tests/mir-opt/const_prop/slice_len.rs b/tests/mir-opt/const_prop/slice_len.rs
index 3d1b58965ac..46604cfe1e0 100644
--- a/tests/mir-opt/const_prop/slice_len.rs
+++ b/tests/mir-opt/const_prop/slice_len.rs
@@ -7,7 +7,7 @@
 fn main() {
     // CHECK-LABEL: fn main(
     // CHECK: debug a => [[a:_.*]];
-    // CHECK: [[slice:_.*]] = {{.*}} as &[u32] (PointerCoercion(Unsize));
+    // CHECK: [[slice:_.*]] = copy {{.*}} as &[u32] (PointerCoercion(Unsize));
     // CHECK: assert(const true,
     // CHECK: [[a]] = const 2_u32;
     let a = (&[1u32, 2, 3] as &[u32])[1];