about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound.GVN.panic-abort.diff
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2025-01-18 22:09:19 +0000
committerRémy Rakic <remy.rakic+github@gmail.com>2025-01-18 22:09:35 +0000
commit122a55bb442bd1995df9cf9b36e6f65ed3ef4a1d (patch)
treefb767afc334273592893acccd71c2ba8e4903fae /tests/mir-opt/lower_array_len.array_bound.GVN.panic-abort.diff
parent0bb4880581a6963e0b895f9550e9147c68b9537a (diff)
downloadrust-122a55bb442bd1995df9cf9b36e6f65ed3ef4a1d.tar.gz
rust-122a55bb442bd1995df9cf9b36e6f65ed3ef4a1d.zip
Revert "Auto merge of #133734 - scottmcm:lower-indexing-to-ptrmetadata, r=davidtwco,RalfJung"
This reverts commit b57d93d8b9525fa261404b4cd9c0670eeb1264b8, reversing
changes made to 0aeaa5eb22180fdf12a8489e63c4daa18da6f236.
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.GVN.panic-abort.diff')
-rw-r--r--tests/mir-opt/lower_array_len.array_bound.GVN.panic-abort.diff20
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/mir-opt/lower_array_len.array_bound.GVN.panic-abort.diff b/tests/mir-opt/lower_array_len.array_bound.GVN.panic-abort.diff
index 98c5e868046..f052c8f63dc 100644
--- a/tests/mir-opt/lower_array_len.array_bound.GVN.panic-abort.diff
+++ b/tests/mir-opt/lower_array_len.array_bound.GVN.panic-abort.diff
@@ -11,14 +11,16 @@
       let mut _6: &[u8];
       let mut _7: &[u8; N];
       let _8: usize;
-      let mut _9: bool;
+      let mut _9: usize;
+      let mut _10: bool;
   
       bb0: {
 -         StorageLive(_3);
 +         nop;
           StorageLive(_4);
           _4 = copy _1;
-          StorageLive(_5);
+-         StorageLive(_5);
++         nop;
           StorageLive(_6);
           StorageLive(_7);
           _7 = &(*_2);
@@ -38,13 +40,16 @@
       }
   
       bb2: {
-          StorageDead(_5);
+-         StorageDead(_5);
++         nop;
           StorageDead(_4);
           StorageLive(_8);
           _8 = copy _1;
--         _9 = Lt(copy _8, const N);
--         assert(move _9, "index out of bounds: the length is {} but the index is {}", const N, copy _8) -> [success: bb3, unwind unreachable];
-+         _9 = copy _3;
+-         _9 = Len((*_2));
+-         _10 = Lt(copy _8, copy _9);
+-         assert(move _10, "index out of bounds: the length is {} but the index is {}", move _9, copy _8) -> [success: bb3, unwind unreachable];
++         _9 = const N;
++         _10 = copy _3;
 +         assert(copy _3, "index out of bounds: the length is {} but the index is {}", const N, copy _1) -> [success: bb3, unwind unreachable];
       }
   
@@ -56,7 +61,8 @@
       }
   
       bb4: {
-          StorageDead(_5);
+-         StorageDead(_5);
++         nop;
           StorageDead(_4);
           _0 = const 42_u8;
           goto -> bb5;