about summary refs log tree commit diff
path: root/tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-abort.mir
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-abort.mir')
-rw-r--r--tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-abort.mir52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-abort.mir
new file mode 100644
index 00000000000..c12f3591881
--- /dev/null
+++ b/tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-abort.mir
@@ -0,0 +1,52 @@
+// MIR for `while_loop` after PreCodegen
+
+fn while_loop(_1: bool) -> () {
+    debug c => _1;                       // in scope 0 at $DIR/while_storage.rs:+0:15: +0:16
+    let mut _0: ();                      // return place in scope 0 at $DIR/while_storage.rs:+0:24: +0:24
+    let mut _2: bool;                    // in scope 0 at $DIR/while_storage.rs:+1:11: +1:22
+    let mut _3: bool;                    // in scope 0 at $DIR/while_storage.rs:+2:12: +2:23
+
+    bb0: {
+        goto -> bb1;                     // scope 0 at $DIR/while_storage.rs:+1:5: +5:6
+    }
+
+    bb1: {
+        StorageLive(_2);                 // scope 0 at $DIR/while_storage.rs:+1:11: +1:22
+        _2 = get_bool(_1) -> [return: bb2, unwind unreachable]; // scope 0 at $DIR/while_storage.rs:+1:11: +1:22
+                                         // mir::Constant
+                                         // + span: $DIR/while_storage.rs:11:11: 11:19
+                                         // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(<ZST>) }
+    }
+
+    bb2: {
+        switchInt(move _2) -> [0: bb7, otherwise: bb3]; // scope 0 at $DIR/while_storage.rs:+1:11: +1:22
+    }
+
+    bb3: {
+        StorageLive(_3);                 // scope 0 at $DIR/while_storage.rs:+2:12: +2:23
+        _3 = get_bool(_1) -> [return: bb4, unwind unreachable]; // scope 0 at $DIR/while_storage.rs:+2:12: +2:23
+                                         // mir::Constant
+                                         // + span: $DIR/while_storage.rs:12:12: 12:20
+                                         // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(<ZST>) }
+    }
+
+    bb4: {
+        switchInt(move _3) -> [0: bb5, otherwise: bb6]; // scope 0 at $DIR/while_storage.rs:+2:12: +2:23
+    }
+
+    bb5: {
+        StorageDead(_3);                 // scope 0 at $DIR/while_storage.rs:+4:9: +4:10
+        StorageDead(_2);                 // scope 0 at $DIR/while_storage.rs:+5:5: +5:6
+        goto -> bb1;                     // scope 0 at $DIR/while_storage.rs:+1:5: +5:6
+    }
+
+    bb6: {
+        StorageDead(_3);                 // scope 0 at $DIR/while_storage.rs:+4:9: +4:10
+        goto -> bb7;                     // scope 0 at no-location
+    }
+
+    bb7: {
+        StorageDead(_2);                 // scope 0 at $DIR/while_storage.rs:+5:5: +5:6
+        return;                          // scope 0 at $DIR/while_storage.rs:+6:2: +6:2
+    }
+}