about summary refs log tree commit diff
path: root/tests/mir-opt/dead-store-elimination/ref.dead_first.DeadStoreElimination-initial.diff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/dead-store-elimination/ref.dead_first.DeadStoreElimination-initial.diff')
-rw-r--r--tests/mir-opt/dead-store-elimination/ref.dead_first.DeadStoreElimination-initial.diff30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/mir-opt/dead-store-elimination/ref.dead_first.DeadStoreElimination-initial.diff b/tests/mir-opt/dead-store-elimination/ref.dead_first.DeadStoreElimination-initial.diff
new file mode 100644
index 00000000000..2a793e24990
--- /dev/null
+++ b/tests/mir-opt/dead-store-elimination/ref.dead_first.DeadStoreElimination-initial.diff
@@ -0,0 +1,30 @@
+- // MIR for `dead_first` before DeadStoreElimination-initial
++ // MIR for `dead_first` after DeadStoreElimination-initial
+  
+  fn dead_first(_1: &Foo) -> &i32 {
+      debug v => _1;
+      let mut _0: &i32;
+      let mut _2: &i32;
+      let mut _3: &i32;
+      let _4: &i32;
+      scope 1 {
+          debug a => _2;
+      }
+  
+      bb0: {
+          StorageLive(_2);
+-         _2 = &((*_1).2: i32);
++         // DBG: _2 = &((*_1).2: i32);
+          StorageLive(_3);
+          StorageLive(_4);
+          _4 = &((*_1).0: i32);
+          _3 = &(*_4);
+          _2 = move _3;
+          StorageDead(_3);
+          StorageDead(_4);
+          _0 = &(*_2);
+          StorageDead(_2);
+          return;
+      }
+  }
+