about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound_mut.GVN.panic-unwind.diff
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2024-06-22 12:11:14 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2024-06-22 20:27:08 -0700
commita76e1d9b09ece967c01aafd3f8419f579a7ac5ca (patch)
tree8484fe9b33b82da421a3d3bb7af61bc7626094ce /tests/mir-opt/lower_array_len.array_bound_mut.GVN.panic-unwind.diff
parent9140c9ad5b1279aecfebb6c64b18dbaf67150183 (diff)
downloadrust-a76e1d9b09ece967c01aafd3f8419f579a7ac5ca.tar.gz
rust-a76e1d9b09ece967c01aafd3f8419f579a7ac5ca.zip
Add a `pointee_metadata_ty_or_projection` helper
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound_mut.GVN.panic-unwind.diff')
-rw-r--r--tests/mir-opt/lower_array_len.array_bound_mut.GVN.panic-unwind.diff24
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/mir-opt/lower_array_len.array_bound_mut.GVN.panic-unwind.diff b/tests/mir-opt/lower_array_len.array_bound_mut.GVN.panic-unwind.diff
index 6e67a6c17ef..ec569ab5042 100644
--- a/tests/mir-opt/lower_array_len.array_bound_mut.GVN.panic-unwind.diff
+++ b/tests/mir-opt/lower_array_len.array_bound_mut.GVN.panic-unwind.diff
@@ -18,10 +18,12 @@
       let mut _13: bool;
   
       bb0: {
-          StorageLive(_3);
+-         StorageLive(_3);
++         nop;
           StorageLive(_4);
           _4 = _1;
-          StorageLive(_5);
+-         StorageLive(_5);
++         nop;
           StorageLive(_6);
           StorageLive(_7);
           _7 = &(*_2);
@@ -35,12 +37,14 @@
       bb1: {
           StorageDead(_6);
 -         _3 = Lt(move _4, move _5);
-+         _3 = Lt(_1, move _5);
-          switchInt(move _3) -> [0: bb4, otherwise: bb2];
+-         switchInt(move _3) -> [0: bb4, otherwise: bb2];
++         _3 = Lt(_1, const N);
++         switchInt(_3) -> [0: bb4, otherwise: bb2];
       }
   
       bb2: {
-          StorageDead(_5);
+-         StorageDead(_5);
++         nop;
           StorageDead(_4);
           StorageLive(_8);
           _8 = _1;
@@ -48,8 +52,8 @@
 -         _10 = Lt(_8, _9);
 -         assert(move _10, "index out of bounds: the length is {} but the index is {}", move _9, _8) -> [success: bb3, unwind continue];
 +         _9 = const N;
-+         _10 = Lt(_1, const N);
-+         assert(move _10, "index out of bounds: the length is {} but the index is {}", const N, _1) -> [success: bb3, unwind continue];
++         _10 = _3;
++         assert(_3, "index out of bounds: the length is {} but the index is {}", const N, _1) -> [success: bb3, unwind continue];
       }
   
       bb3: {
@@ -60,7 +64,8 @@
       }
   
       bb4: {
-          StorageDead(_5);
+-         StorageDead(_5);
++         nop;
           StorageDead(_4);
           StorageLive(_11);
           _11 = const 0_usize;
@@ -81,7 +86,8 @@
       }
   
       bb6: {
-          StorageDead(_3);
+-         StorageDead(_3);
++         nop;
           return;
       }
   }