about summary refs log tree commit diff
path: root/tests/mir-opt/dataflow-const-prop/array_index.rs
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2024-12-01 20:14:04 -0800
committerScott McMurray <scottmcm@users.noreply.github.com>2024-12-03 11:05:45 -0800
commit612adbb6bf88ecf549fb93cb1f4edcf793bca88e (patch)
tree3f37a1552ccefe3df0da67281b5e060bcc2d3d21 /tests/mir-opt/dataflow-const-prop/array_index.rs
parent490b2cc09860dd62a7595bb07364d71c12ce4e60 (diff)
downloadrust-612adbb6bf88ecf549fb93cb1f4edcf793bca88e.tar.gz
rust-612adbb6bf88ecf549fb93cb1f4edcf793bca88e.zip
Bounds-check with PtrMetadata instead of Len in MIR
Diffstat (limited to 'tests/mir-opt/dataflow-const-prop/array_index.rs')
-rw-r--r--tests/mir-opt/dataflow-const-prop/array_index.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/mir-opt/dataflow-const-prop/array_index.rs b/tests/mir-opt/dataflow-const-prop/array_index.rs
index e442ef99f79..1aa8dcd28f4 100644
--- a/tests/mir-opt/dataflow-const-prop/array_index.rs
+++ b/tests/mir-opt/dataflow-const-prop/array_index.rs
@@ -11,9 +11,10 @@ fn main() {
 
     // CHECK:       [[array_lit]] = [const 0_u32, const 1_u32, const 2_u32, const 3_u32];
     // CHECK-NOT:   {{_.*}} = Len(
+    // CHECK-NOT:   {{_.*}} = PtrMetadata(
     // CHECK-NOT:   {{_.*}} = Lt(
     // CHECK-NOT:   assert(move _
-    // CHECK:       {{_.*}} = const 4_usize;
+    // CHECK:       {{_.*}} = const 2_usize;
     // CHECK:       {{_.*}} = const true;
     // CHECK:       assert(const true
     // CHECK:       [[x]] = copy [[array_lit]][2 of 3];