about summary refs log tree commit diff
path: root/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-abort.diff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-abort.diff')
-rw-r--r--tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-abort.diff25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-abort.diff b/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-abort.diff
new file mode 100644
index 00000000000..803e1d711de
--- /dev/null
+++ b/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-abort.diff
@@ -0,0 +1,25 @@
+- // MIR for `hello` before GVN
++ // MIR for `hello` after GVN
+  
+  fn hello() -> () {
+      let mut _0: ();
+      let mut _1: bool;
+      let mut _2: !;
+  
+      bb0: {
+          StorageLive(_1);
+          _1 = const _;
+-         switchInt(move _1) -> [0: bb2, otherwise: bb1];
++         switchInt(const false) -> [0: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+          _2 = begin_panic::<&str>(const "explicit panic") -> unwind unreachable;
+      }
+  
+      bb2: {
+          StorageDead(_1);
+          return;
+      }
+  }
+