summary refs log tree commit diff
path: root/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff
diff options
context:
space:
mode:
authorGeorge Bateman <george.bateman16@gmail.com>2024-04-28 21:10:09 +0100
committerGeorge Bateman <george.bateman16@gmail.com>2024-04-28 21:10:09 +0100
commit2348eb271c95f7ba75333f41b1a303b3b7261b4f (patch)
tree2acd57ee5db64f6c6a61b0bcf9c8036be2433874 /tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff
parentca79086c874278bf362391996be7b49ccf30160a (diff)
downloadrust-2348eb271c95f7ba75333f41b1a303b3b7261b4f.tar.gz
rust-2348eb271c95f7ba75333f41b1a303b3b7261b4f.zip
Update mir-opt tests, add proper regression test
Diffstat (limited to 'tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff')
-rw-r--r--tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff58
1 files changed, 14 insertions, 44 deletions
diff --git a/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff
index 7f166e4fa35..c6908166def 100644
--- a/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff
@@ -4,21 +4,17 @@
   fn generic() -> () {
       let mut _0: ();
       let _1: usize;
-      let mut _2: usize;
-      let mut _4: usize;
-      let mut _6: usize;
-      let mut _8: usize;
       scope 1 {
           debug gx => _1;
-          let _3: usize;
+          let _2: usize;
           scope 2 {
-              debug gy => _3;
-              let _5: usize;
+              debug gy => _2;
+              let _3: usize;
               scope 3 {
-                  debug dx => _5;
-                  let _7: usize;
+                  debug dx => _3;
+                  let _4: usize;
                   scope 4 {
-                      debug dy => _7;
+                      debug dy => _4;
                   }
               }
           }
@@ -26,45 +22,19 @@
   
       bb0: {
           StorageLive(_1);
+          _1 = OffsetOf(Gamma<T>, [(0, 0)]);
           StorageLive(_2);
-          _2 = OffsetOf(Gamma<T>, [(0, 0)]);
-          _1 = must_use::<usize>(move _2) -> [return: bb1, unwind unreachable];
-      }
-  
-      bb1: {
-          StorageDead(_2);
+          _2 = OffsetOf(Gamma<T>, [(0, 1)]);
           StorageLive(_3);
+-         _3 = OffsetOf(Delta<T>, [(0, 1)]);
++         _3 = const 0_usize;
           StorageLive(_4);
-          _4 = OffsetOf(Gamma<T>, [(0, 1)]);
-          _3 = must_use::<usize>(move _4) -> [return: bb2, unwind unreachable];
-      }
-  
-      bb2: {
-          StorageDead(_4);
-          StorageLive(_5);
-          StorageLive(_6);
--         _6 = OffsetOf(Delta<T>, [(0, 1)]);
--         _5 = must_use::<usize>(move _6) -> [return: bb3, unwind unreachable];
-+         _6 = const 0_usize;
-+         _5 = must_use::<usize>(const 0_usize) -> [return: bb3, unwind unreachable];
-      }
-  
-      bb3: {
-          StorageDead(_6);
-          StorageLive(_7);
-          StorageLive(_8);
--         _8 = OffsetOf(Delta<T>, [(0, 2)]);
--         _7 = must_use::<usize>(move _8) -> [return: bb4, unwind unreachable];
-+         _8 = const 2_usize;
-+         _7 = must_use::<usize>(const 2_usize) -> [return: bb4, unwind unreachable];
-      }
-  
-      bb4: {
-          StorageDead(_8);
+-         _4 = OffsetOf(Delta<T>, [(0, 2)]);
++         _4 = const 2_usize;
           _0 = const ();
-          StorageDead(_7);
-          StorageDead(_5);
+          StorageDead(_4);
           StorageDead(_3);
+          StorageDead(_2);
           StorageDead(_1);
           return;
       }