about summary refs log tree commit diff
path: root/tests/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination-initial.diff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination-initial.diff')
-rw-r--r--tests/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination-initial.diff29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination-initial.diff b/tests/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination-initial.diff
new file mode 100644
index 00000000000..f13588c3aa4
--- /dev/null
+++ b/tests/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination-initial.diff
@@ -0,0 +1,29 @@
+- // MIR for `cycle` before DeadStoreElimination-initial
++ // MIR for `cycle` after DeadStoreElimination-initial
+  
+  fn cycle(_1: i32, _2: i32, _3: i32) -> () {
+      let mut _0: ();
+      let mut _4: bool;
+-     let mut _5: i32;
+  
+      bb0: {
+          _4 = cond() -> [return: bb1, unwind continue];
+      }
+  
+      bb1: {
+          switchInt(_4) -> [1: bb2, otherwise: bb3];
+      }
+  
+      bb2: {
+-         _5 = _3;
+-         _3 = _2;
+-         _2 = _1;
+-         _1 = _5;
+          _4 = cond() -> [return: bb1, unwind continue];
+      }
+  
+      bb3: {
+          return;
+      }
+  }
+