about summary refs log tree commit diff
path: root/src/test/mir-opt/simplify_locals.c.SimplifyLocals-before-const-prop.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-09 13:13:35 +0000
committerbors <bors@rust-lang.org>2023-01-09 13:13:35 +0000
commitd61d359d5ef5e3192611297805dbfbb52c55de8f (patch)
tree374888d2e6ddfc2006e9eb8dadc2f0d6214562e8 /src/test/mir-opt/simplify_locals.c.SimplifyLocals-before-const-prop.diff
parent87a202e6f23896f867457c0a26b31b367fa1c0e0 (diff)
parent236ae262bc80dabf67669a2763fda5034982b9b9 (diff)
Auto merge of #2753 - RalfJung:rustup, r=RalfJung
Rustup

Pulls in https://github.com/rust-lang/rust/pull/104658
Diffstat (limited to 'src/test/mir-opt/simplify_locals.c.SimplifyLocals-before-const-prop.diff')
-rw-r--r--src/test/mir-opt/simplify_locals.c.SimplifyLocals-before-const-prop.diff33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/test/mir-opt/simplify_locals.c.SimplifyLocals-before-const-prop.diff b/src/test/mir-opt/simplify_locals.c.SimplifyLocals-before-const-prop.diff
new file mode 100644
index 00000000000..1be27e96397
--- /dev/null
+++ b/src/test/mir-opt/simplify_locals.c.SimplifyLocals-before-const-prop.diff
@@ -0,0 +1,33 @@
+- // MIR for `c` before SimplifyLocals-before-const-prop
++ // MIR for `c` after SimplifyLocals-before-const-prop
+  
+  fn c() -> () {
+      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals.rs:+0:8: +0:8
+      let _1: [u8; 10];                    // in scope 0 at $DIR/simplify_locals.rs:+1:9: +1:14
+-     let mut _2: &[u8];                   // in scope 0 at $DIR/simplify_locals.rs:+3:20: +3:26
+-     let mut _3: &[u8; 10];               // in scope 0 at $DIR/simplify_locals.rs:+3:20: +3:26
+-     let _4: &[u8; 10];                   // in scope 0 at $DIR/simplify_locals.rs:+3:20: +3:26
+      scope 1 {
+          debug bytes => _1;               // in scope 1 at $DIR/simplify_locals.rs:+1:9: +1:14
+          scope 2 {
+          }
+      }
+  
+      bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/simplify_locals.rs:+1:9: +1:14
+          _1 = [const 0_u8; 10];           // scope 0 at $DIR/simplify_locals.rs:+1:17: +1:26
+-         StorageLive(_2);                 // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         StorageLive(_3);                 // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         StorageLive(_4);                 // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         _4 = &_1;                        // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         _3 = &(*_4);                     // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         _2 = move _3 as &[u8] (Pointer(Unsize)); // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         StorageDead(_3);                 // scope 1 at $DIR/simplify_locals.rs:+3:25: +3:26
+-         StorageDead(_4);                 // scope 1 at $DIR/simplify_locals.rs:+3:26: +3:27
+-         StorageDead(_2);                 // scope 1 at $DIR/simplify_locals.rs:+3:26: +3:27
+          _0 = const ();                   // scope 0 at $DIR/simplify_locals.rs:+0:8: +4:2
+          StorageDead(_1);                 // scope 0 at $DIR/simplify_locals.rs:+4:1: +4:2
+          return;                          // scope 0 at $DIR/simplify_locals.rs:+4:2: +4:2
+      }
+  }
+