about summary refs log tree commit diff
path: root/src/test/mir-opt/const_prop
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2021-09-16 23:04:02 +0100
committerGary Guo <gary@garyguo.net>2021-09-25 01:08:41 +0100
commitab64580977ca6dabc07f5944898435708bfbb0c8 (patch)
tree071e9753e4782780d69af35964be81616f51c652 /src/test/mir-opt/const_prop
parent19eaee2c329a428ba052ef30a5d51464b098e591 (diff)
downloadrust-ab64580977ca6dabc07f5944898435708bfbb0c8.tar.gz
rust-ab64580977ca6dabc07f5944898435708bfbb0c8.zip
Bless tests
Diffstat (limited to 'src/test/mir-opt/const_prop')
-rw-r--r--src/test/mir-opt/const_prop/boxes.main.ConstProp.diff35
1 files changed, 26 insertions, 9 deletions
diff --git a/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff b/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff
index 9fcbd32ca68..342c987343e 100644
--- a/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff
@@ -6,34 +6,51 @@
       let _1: i32;                         // in scope 0 at $DIR/boxes.rs:12:9: 12:10
       let mut _2: i32;                     // in scope 0 at $DIR/boxes.rs:12:13: 12:22
       let mut _3: std::boxed::Box<i32>;    // in scope 0 at $DIR/boxes.rs:12:14: 12:22
-      let mut _4: std::boxed::Box<i32>;    // in scope 0 at $DIR/boxes.rs:12:14: 12:22
+      let mut _4: usize;                   // in scope 0 at $DIR/boxes.rs:12:14: 12:22
+      let mut _5: usize;                   // in scope 0 at $DIR/boxes.rs:12:14: 12:22
+      let mut _6: *mut u8;                 // in scope 0 at $DIR/boxes.rs:12:14: 12:22
+      let mut _7: std::boxed::Box<i32>;    // in scope 0 at $DIR/boxes.rs:12:14: 12:22
       scope 1 {
           debug x => _1;                   // in scope 1 at $DIR/boxes.rs:12:9: 12:10
       }
+      scope 2 {
+      }
   
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/boxes.rs:12:9: 12:10
           StorageLive(_2);                 // scope 0 at $DIR/boxes.rs:12:13: 12:22
           StorageLive(_3);                 // scope 0 at $DIR/boxes.rs:12:14: 12:22
-          StorageLive(_4);                 // scope 0 at $DIR/boxes.rs:12:14: 12:22
-          _4 = Box(i32);                   // scope 0 at $DIR/boxes.rs:12:14: 12:22
-          (*_4) = const 42_i32;            // scope 0 at $DIR/boxes.rs:12:19: 12:21
-          _3 = move _4;                    // scope 0 at $DIR/boxes.rs:12:14: 12:22
-          StorageDead(_4);                 // scope 0 at $DIR/boxes.rs:12:21: 12:22
+-         _4 = SizeOf(i32);                // scope 2 at $DIR/boxes.rs:12:14: 12:22
+-         _5 = AlignOf(i32);               // scope 2 at $DIR/boxes.rs:12:14: 12:22
+-         _6 = alloc::alloc::exchange_malloc(move _4, move _5) -> bb1; // scope 2 at $DIR/boxes.rs:12:14: 12:22
++         _4 = const 4_usize;              // scope 2 at $DIR/boxes.rs:12:14: 12:22
++         _5 = const 4_usize;              // scope 2 at $DIR/boxes.rs:12:14: 12:22
++         _6 = alloc::alloc::exchange_malloc(const 4_usize, const 4_usize) -> bb1; // scope 2 at $DIR/boxes.rs:12:14: 12:22
+                                           // mir::Constant
+                                           // + span: $DIR/boxes.rs:12:14: 12:22
+                                           // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar(<ZST>)) }
+      }
+  
+      bb1: {
+          StorageLive(_7);                 // scope 0 at $DIR/boxes.rs:12:14: 12:22
+          _7 = ShallowInitBox(move _6, i32); // scope 0 at $DIR/boxes.rs:12:14: 12:22
+          (*_7) = const 42_i32;            // scope 0 at $DIR/boxes.rs:12:19: 12:21
+          _3 = move _7;                    // scope 0 at $DIR/boxes.rs:12:14: 12:22
+          StorageDead(_7);                 // scope 0 at $DIR/boxes.rs:12:21: 12:22
           _2 = (*_3);                      // scope 0 at $DIR/boxes.rs:12:13: 12:22
           _1 = Add(move _2, const 0_i32);  // scope 0 at $DIR/boxes.rs:12:13: 12:26
           StorageDead(_2);                 // scope 0 at $DIR/boxes.rs:12:25: 12:26
-          drop(_3) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/boxes.rs:12:26: 12:27
+          drop(_3) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/boxes.rs:12:26: 12:27
       }
   
-      bb1: {
+      bb2: {
           StorageDead(_3);                 // scope 0 at $DIR/boxes.rs:12:26: 12:27
           nop;                             // scope 0 at $DIR/boxes.rs:11:11: 13:2
           StorageDead(_1);                 // scope 0 at $DIR/boxes.rs:13:1: 13:2
           return;                          // scope 0 at $DIR/boxes.rs:13:2: 13:2
       }
   
-      bb2 (cleanup): {
+      bb3 (cleanup): {
           resume;                          // scope 0 at $DIR/boxes.rs:11:1: 13:2
       }
   }