about summary refs log tree commit diff
path: root/tests/mir-opt/dataflow-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/dataflow-const-prop
parent32185decd6875d5a86374043c7cfa77682b98ba3 (diff)
downloadrust-249a36ffbd577fc76153b7ad4cafd33607ee4ddc.tar.gz
rust-249a36ffbd577fc76153b7ad4cafd33607ee4ddc.zip
Update mir-opt filechecks
Diffstat (limited to 'tests/mir-opt/dataflow-const-prop')
-rw-r--r--tests/mir-opt/dataflow-const-prop/array_index.rs2
-rw-r--r--tests/mir-opt/dataflow-const-prop/enum.rs10
-rw-r--r--tests/mir-opt/dataflow-const-prop/large_array_index.rs2
-rw-r--r--tests/mir-opt/dataflow-const-prop/ref_without_sb.rs2
-rw-r--r--tests/mir-opt/dataflow-const-prop/repeat.rs4
-rw-r--r--tests/mir-opt/dataflow-const-prop/sibling_ptr.rs2
-rw-r--r--tests/mir-opt/dataflow-const-prop/slice_len.rs6
-rw-r--r--tests/mir-opt/dataflow-const-prop/struct.rs16
8 files changed, 22 insertions, 22 deletions
diff --git a/tests/mir-opt/dataflow-const-prop/array_index.rs b/tests/mir-opt/dataflow-const-prop/array_index.rs
index daf9c7729c6..e442ef99f79 100644
--- a/tests/mir-opt/dataflow-const-prop/array_index.rs
+++ b/tests/mir-opt/dataflow-const-prop/array_index.rs
@@ -16,6 +16,6 @@ fn main() {
     // CHECK:       {{_.*}} = const 4_usize;
     // CHECK:       {{_.*}} = const true;
     // CHECK:       assert(const true
-    // CHECK:       [[x]] = [[array_lit]][2 of 3];
+    // CHECK:       [[x]] = copy [[array_lit]][2 of 3];
     let x: u32 = [0, 1, 2, 3][2];
 }
diff --git a/tests/mir-opt/dataflow-const-prop/enum.rs b/tests/mir-opt/dataflow-const-prop/enum.rs
index 37304e3a270..207e29e63df 100644
--- a/tests/mir-opt/dataflow-const-prop/enum.rs
+++ b/tests/mir-opt/dataflow-const-prop/enum.rs
@@ -73,7 +73,7 @@ fn statics() {
     static RC: &E = &E::V2(4);
 
     // CHECK: [[t:_.*]] = const {alloc5: &&E};
-    // CHECK: [[e2]] = (*[[t]]);
+    // CHECK: [[e2]] = copy (*[[t]]);
     let e2 = RC;
 
     // CHECK: switchInt({{move _.*}}) -> {{.*}}
@@ -108,7 +108,7 @@ fn mutate_discriminant() -> u8 {
             // CHECK: [[a:_.*]] = discriminant({{_.*}});
             let a = Discriminant(x);
 
-            // CHECK: switchInt([[a]]) -> [0: {{bb.*}}, otherwise: {{bb.*}}];
+            // CHECK: switchInt(copy [[a]]) -> [0: {{bb.*}}, otherwise: {{bb.*}}];
             match a {
                 0 => bb1,
                 _ => bad,
@@ -143,8 +143,8 @@ fn multiple(x: bool, i: u8) {
     //   discriminant(e) => Top
     //   (e as Some).0 => Top
     // CHECK: [[x2]] = const 0_u8;
-    // CHECK: [[some:_.*]] = (({{_.*}} as Some).0: u8)
-    // CHECK: [[x2]] = [[some]];
+    // CHECK: [[some:_.*]] = copy (({{_.*}} as Some).0: u8)
+    // CHECK: [[x2]] = copy [[some]];
     let x2 = match e {
         Some(i) => i,
         None => 0,
@@ -153,7 +153,7 @@ fn multiple(x: bool, i: u8) {
     // Therefore, `x2` should be `Top` here, and no replacement shall happen.
 
     // CHECK-NOT: [[y]] = const
-    // CHECK: [[y]] = [[x2]];
+    // CHECK: [[y]] = copy [[x2]];
     // CHECK-NOT: [[y]] = const
     let y = x2;
 }
diff --git a/tests/mir-opt/dataflow-const-prop/large_array_index.rs b/tests/mir-opt/dataflow-const-prop/large_array_index.rs
index e74fd88d002..e9f2fa2badf 100644
--- a/tests/mir-opt/dataflow-const-prop/large_array_index.rs
+++ b/tests/mir-opt/dataflow-const-prop/large_array_index.rs
@@ -13,6 +13,6 @@ fn main() {
     // CHECK: {{_.*}} = const 5000_usize;
     // CHECK: {{_.*}} = const true;
     // CHECK: assert(const true
-    // CHECK: [[x]] = [[array_lit]][2 of 3];
+    // CHECK: [[x]] = copy [[array_lit]][2 of 3];
     let x: u8 = [0_u8; 5000][2];
 }
diff --git a/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs b/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs
index 399de921a59..1c4eb41f35e 100644
--- a/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs
+++ b/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs
@@ -24,7 +24,7 @@ fn main() {
     // This should currently not be propagated.
 
     // CHECK-NOT: [[b]] = const
-    // CHECK: [[b]] = [[a]];
+    // CHECK: [[b]] = copy [[a]];
     // CHECK-NOT: [[b]] = const
     let b = a;
 }
diff --git a/tests/mir-opt/dataflow-const-prop/repeat.rs b/tests/mir-opt/dataflow-const-prop/repeat.rs
index e32c0d0877d..2067aa3d709 100644
--- a/tests/mir-opt/dataflow-const-prop/repeat.rs
+++ b/tests/mir-opt/dataflow-const-prop/repeat.rs
@@ -14,8 +14,8 @@ fn main() {
     // CHECK: {{_.*}} = const true;
     // CHECK: assert(const true
 
-    // CHECK-NOT: [[t:_.*]] = [[array_lit]][_
-    // CHECK: [[t:_.*]] = [[array_lit]][2 of 3];
+    // CHECK-NOT: [[t:_.*]] = {{copy|move}} [[array_lit]][_
+    // CHECK: [[t:_.*]] = copy [[array_lit]][2 of 3];
     // CHECK: [[x]] = Add(move [[t]], const 0_u32);
     let x: u32 = [42; 8][2] + 0;
 }
diff --git a/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs b/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs
index be7f311cdc1..b123f06807d 100644
--- a/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs
+++ b/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs
@@ -20,6 +20,6 @@ fn main() {
         *p.add(1) = 1;
     }
 
-    // CHECK: [[x1]] = ({{_.*}}.1: u8);
+    // CHECK: [[x1]] = copy ({{_.*}}.1: u8);
     let x1 = x.1; // should not be propagated
 }
diff --git a/tests/mir-opt/dataflow-const-prop/slice_len.rs b/tests/mir-opt/dataflow-const-prop/slice_len.rs
index 64c043cca79..e0e68f9fde5 100644
--- a/tests/mir-opt/dataflow-const-prop/slice_len.rs
+++ b/tests/mir-opt/dataflow-const-prop/slice_len.rs
@@ -17,7 +17,7 @@ fn main() {
     // CHECK: {{_.*}} = const true;
     // CHECK: assert(const true,
 
-    // CHECK: [[local]] = (*{{_.*}})[1 of 2];
+    // CHECK: [[local]] = copy (*{{_.*}})[1 of 2];
     let local = (&[1u32, 2, 3] as &[u32])[1];
 
     // CHECK-NOT: {{_.*}} = Len(
@@ -28,7 +28,7 @@ fn main() {
     // CHECK: {{_.*}} = const true;
     // CHECK: assert(const true,
 
-    // CHECK-NOT: [[constant]] = (*{{_.*}})[_
-    // CHECK: [[constant]] = (*{{_.*}})[1 of 2];
+    // CHECK-NOT: [[constant]] = {{copy|move}} (*{{_.*}})[_
+    // CHECK: [[constant]] = copy (*{{_.*}})[1 of 2];
     let constant = SLICE[1];
 }
diff --git a/tests/mir-opt/dataflow-const-prop/struct.rs b/tests/mir-opt/dataflow-const-prop/struct.rs
index 89ad1b87029..44591ffb6de 100644
--- a/tests/mir-opt/dataflow-const-prop/struct.rs
+++ b/tests/mir-opt/dataflow-const-prop/struct.rs
@@ -46,15 +46,15 @@ fn main() {
     const SMALL_VAL: SmallStruct = SmallStruct(4., Some(S(1)), &[]);
 
     // CHECK: [[a1]] = const 4f32;
-    // CHECK: [[b1]] = ({{_.*}}.1: std::option::Option<S>);
-    // CHECK: [[c1]] = ({{_.*}}.2: &[f32]);
+    // CHECK: [[b1]] = copy ({{_.*}}.1: std::option::Option<S>);
+    // CHECK: [[c1]] = copy ({{_.*}}.2: &[f32]);
     let SmallStruct(a1, b1, c1) = SMALL_VAL;
 
     static SMALL_STAT: &SmallStruct = &SmallStruct(9., None, &[13.]);
 
     // CHECK: [[a2]] = const 9f32;
-    // CHECK: [[b2]] = ((*{{_.*}}).1: std::option::Option<S>);
-    // CHECK: [[c2]] = ((*{{_.*}}).2: &[f32]);
+    // CHECK: [[b2]] = copy ((*{{_.*}}).1: std::option::Option<S>);
+    // CHECK: [[c2]] = copy ((*{{_.*}}).2: &[f32]);
     let SmallStruct(a2, b2, c2) = *SMALL_STAT;
 
     // CHECK: [[ss]] = SmallStruct(const 9f32, move {{_.*}}, move {{_.*}});
@@ -63,14 +63,14 @@ fn main() {
     const BIG_VAL: BigStruct = BigStruct(25., None, &[]);
 
     // CHECK: [[a3]] = const 25f32;
-    // CHECK: [[b3]] = ({{_.*}}.1: std::option::Option<S>);
-    // CHECK: [[c3]] = ({{_.*}}.2: &[f32]);
+    // CHECK: [[b3]] = copy ({{_.*}}.1: std::option::Option<S>);
+    // CHECK: [[c3]] = copy ({{_.*}}.2: &[f32]);
     let BigStruct(a3, b3, c3) = BIG_VAL;
 
     static BIG_STAT: &BigStruct = &BigStruct(82., Some(S(35)), &[45., 72.]);
     // CHECK: [[a4]] = const 82f32;
-    // CHECK: [[b4]] = ((*{{_.*}}).1: std::option::Option<S>);
-    // CHECK: [[c4]] = ((*{{_.*}}).2: &[f32]);
+    // CHECK: [[b4]] = copy ((*{{_.*}}).1: std::option::Option<S>);
+    // CHECK: [[c4]] = copy ((*{{_.*}}).2: &[f32]);
     let BigStruct(a4, b4, c4) = *BIG_STAT;
 
     // We arbitrarily limit the size of synthetized values to 4 pointers.