summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir')
-rw-r--r--tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir
new file mode 100644
index 000000000..986ab3588
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir
@@ -0,0 +1,56 @@
+// MIR for `ezmap` after PreCodegen
+
+fn ezmap(_1: Option<i32>) -> Option<i32> {
+ debug x => _1; // in scope 0 at $DIR/simple_option_map.rs:+0:14: +0:15
+ let mut _0: std::option::Option<i32>; // return place in scope 0 at $DIR/simple_option_map.rs:+0:33: +0:44
+ let mut _6: i32; // in scope 0 at $DIR/simple_option_map.rs:11:25: 11:29
+ scope 1 (inlined map::<i32, i32, [closure@$DIR/simple_option_map.rs:18:12: 18:15]>) { // at $DIR/simple_option_map.rs:18:5: 18:22
+ debug slf => _1; // in scope 1 at $DIR/simple_option_map.rs:6:17: 6:20
+ debug f => const ZeroSized: [closure@$DIR/simple_option_map.rs:18:12: 18:15]; // in scope 1 at $DIR/simple_option_map.rs:6:33: 6:34
+ let mut _2: isize; // in scope 1 at $DIR/simple_option_map.rs:11:9: 11:16
+ let _3: i32; // in scope 1 at $DIR/simple_option_map.rs:11:14: 11:15
+ let mut _4: i32; // in scope 1 at $DIR/simple_option_map.rs:11:25: 11:29
+ let mut _5: (i32,); // in scope 1 at $DIR/simple_option_map.rs:11:25: 11:29
+ scope 2 {
+ debug x => _3; // in scope 2 at $DIR/simple_option_map.rs:11:14: 11:15
+ scope 3 (inlined ezmap::{closure#0}) { // at $DIR/simple_option_map.rs:11:25: 11:29
+ debug n => _6; // in scope 3 at $DIR/simple_option_map.rs:+1:13: +1:14
+ }
+ }
+ }
+
+ bb0: {
+ StorageLive(_3); // scope 0 at $DIR/simple_option_map.rs:+1:5: +1:22
+ _2 = discriminant(_1); // scope 1 at $DIR/simple_option_map.rs:10:11: 10:14
+ switchInt(move _2) -> [0: bb1, 1: bb3, otherwise: bb2]; // scope 1 at $DIR/simple_option_map.rs:10:5: 10:14
+ }
+
+ bb1: {
+ _0 = Option::<i32>::None; // scope 1 at $DIR/simple_option_map.rs:12:17: 12:21
+ goto -> bb4; // scope 1 at $DIR/simple_option_map.rs:12:17: 12:21
+ }
+
+ bb2: {
+ unreachable; // scope 1 at $DIR/simple_option_map.rs:10:11: 10:14
+ }
+
+ bb3: {
+ _3 = ((_1 as Some).0: i32); // scope 1 at $DIR/simple_option_map.rs:11:14: 11:15
+ StorageLive(_4); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
+ StorageLive(_5); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
+ _5 = (move _3,); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
+ StorageLive(_6); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
+ _6 = move (_5.0: i32); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
+ _4 = Add(_6, const 1_i32); // scope 3 at $DIR/simple_option_map.rs:+1:16: +1:21
+ StorageDead(_6); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
+ StorageDead(_5); // scope 2 at $DIR/simple_option_map.rs:11:28: 11:29
+ _0 = Option::<i32>::Some(move _4); // scope 2 at $DIR/simple_option_map.rs:11:20: 11:30
+ StorageDead(_4); // scope 2 at $DIR/simple_option_map.rs:11:29: 11:30
+ goto -> bb4; // scope 1 at $DIR/simple_option_map.rs:14:1: 14:2
+ }
+
+ bb4: {
+ StorageDead(_3); // scope 0 at $DIR/simple_option_map.rs:+1:5: +1:22
+ return; // scope 0 at $DIR/simple_option_map.rs:+2:2: +2:2
+ }
+}