about summary refs log tree commit diff
path: root/tests/mir-opt/dataflow-const-prop/array_index.rs
diff options
context:
space:
mode:
authorsfzhu93 <zhushuofei@gmail.com>2024-01-11 23:22:33 -0800
committersfzhu93 <zhushuofei@gmail.com>2024-01-11 23:36:09 -0800
commit1c886d794c1772eb6a51e84939ef1093e9e10e17 (patch)
treef01ae910d0a16aa63242134b1e649ef613571424 /tests/mir-opt/dataflow-const-prop/array_index.rs
parentd63f10b7addc4f5c5528b76cedb41433a275eed3 (diff)
downloadrust-1c886d794c1772eb6a51e84939ef1093e9e10e17.tar.gz
rust-1c886d794c1772eb6a51e84939ef1093e9e10e17.zip
resolve code reviews
Diffstat (limited to 'tests/mir-opt/dataflow-const-prop/array_index.rs')
-rw-r--r--tests/mir-opt/dataflow-const-prop/array_index.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/mir-opt/dataflow-const-prop/array_index.rs b/tests/mir-opt/dataflow-const-prop/array_index.rs
index 4b070e1d6d6..e21388ff5d2 100644
--- a/tests/mir-opt/dataflow-const-prop/array_index.rs
+++ b/tests/mir-opt/dataflow-const-prop/array_index.rs
@@ -9,8 +9,13 @@ fn main() {
     // CHECK: let mut [[array_lit:_.*]]: [u32; 4];
     // CHECK:     debug x => [[x:_.*]];
 
-    let x: u32 = [0, 1, 2, 3][2];
     // CHECK:       [[array_lit]] = [const 0_u32, const 1_u32, const 2_u32, const 3_u32];
-    // CHECK-LABEL: assert(const true,
-    // CHECK:     [[x]] = [[array_lit]][2 of 3];
+    // CHECK-NOT:   {{_.*}} = Len(
+    // CHECK-NOT:   {{_.*}} = Lt(
+    // CHECK-NOT:   assert(move _
+    // CHECK:       {{_.*}} = const 4_usize;
+    // CHECK:       {{_.*}} = const true;
+    // CHECK-LABEL: assert(const true
+    // CHECK:       [[x]] = [[array_lit]][2 of 3];
+    let x: u32 = [0, 1, 2, 3][2];
 }