diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/mir-opt/early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/mir-opt/early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff')
-rw-r--r-- | tests/mir-opt/early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/tests/mir-opt/early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff b/tests/mir-opt/early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff new file mode 100644 index 000000000..aa75c44b8 --- /dev/null +++ b/tests/mir-opt/early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff @@ -0,0 +1,92 @@ +- // MIR for `opt2` before EarlyOtherwiseBranch ++ // MIR for `opt2` after EarlyOtherwiseBranch + + fn opt2(_1: Option<u32>, _2: Option<u32>) -> u32 { + debug x => _1; // in scope 0 at $DIR/early_otherwise_branch.rs:+0:9: +0:10 + debug y => _2; // in scope 0 at $DIR/early_otherwise_branch.rs:+0:25: +0:26 + let mut _0: u32; // return place in scope 0 at $DIR/early_otherwise_branch.rs:+0:44: +0:47 + let mut _3: (std::option::Option<u32>, std::option::Option<u32>); // in scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17 + let mut _4: std::option::Option<u32>; // in scope 0 at $DIR/early_otherwise_branch.rs:+1:12: +1:13 + let mut _5: std::option::Option<u32>; // in scope 0 at $DIR/early_otherwise_branch.rs:+1:15: +1:16 + let mut _6: isize; // in scope 0 at $DIR/early_otherwise_branch.rs:+3:16: +3:20 + let mut _7: isize; // in scope 0 at $DIR/early_otherwise_branch.rs:+2:19: +2:26 + let mut _8: isize; // in scope 0 at $DIR/early_otherwise_branch.rs:+2:10: +2:17 + let _9: u32; // in scope 0 at $DIR/early_otherwise_branch.rs:+2:15: +2:16 + let _10: u32; // in scope 0 at $DIR/early_otherwise_branch.rs:+2:24: +2:25 ++ let mut _11: isize; // in scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 ++ let mut _12: bool; // in scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 + scope 1 { + debug a => _9; // in scope 1 at $DIR/early_otherwise_branch.rs:+2:15: +2:16 + debug b => _10; // in scope 1 at $DIR/early_otherwise_branch.rs:+2:24: +2:25 + } + + bb0: { + StorageLive(_3); // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17 + StorageLive(_4); // scope 0 at $DIR/early_otherwise_branch.rs:+1:12: +1:13 + _4 = _1; // scope 0 at $DIR/early_otherwise_branch.rs:+1:12: +1:13 + StorageLive(_5); // scope 0 at $DIR/early_otherwise_branch.rs:+1:15: +1:16 + _5 = _2; // scope 0 at $DIR/early_otherwise_branch.rs:+1:15: +1:16 + Deinit(_3); // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17 + (_3.0: std::option::Option<u32>) = move _4; // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17 + (_3.1: std::option::Option<u32>) = move _5; // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17 + StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch.rs:+1:16: +1:17 + StorageDead(_4); // scope 0 at $DIR/early_otherwise_branch.rs:+1:16: +1:17 + _8 = discriminant((_3.0: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17 +- switchInt(move _8) -> [0: bb1, 1: bb3, otherwise: bb2]; // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 ++ StorageLive(_11); // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 ++ _11 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 ++ StorageLive(_12); // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 ++ _12 = Ne(_8, move _11); // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 ++ StorageDead(_11); // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 ++ switchInt(move _12) -> [0: bb5, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 + } + + bb1: { +- _6 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17 +- switchInt(move _6) -> [0: bb5, otherwise: bb2]; // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 +- } +- +- bb2: { ++ StorageDead(_12); // scope 0 at $DIR/early_otherwise_branch.rs:+4:14: +4:15 + _0 = const 1_u32; // scope 0 at $DIR/early_otherwise_branch.rs:+4:14: +4:15 +- goto -> bb6; // scope 0 at $DIR/early_otherwise_branch.rs:+4:14: +4:15 ++ goto -> bb4; // scope 0 at $DIR/early_otherwise_branch.rs:+4:14: +4:15 + } + +- bb3: { +- _7 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17 +- switchInt(move _7) -> [1: bb4, otherwise: bb2]; // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 +- } +- +- bb4: { ++ bb2: { + StorageLive(_9); // scope 0 at $DIR/early_otherwise_branch.rs:+2:15: +2:16 + _9 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:+2:15: +2:16 + StorageLive(_10); // scope 0 at $DIR/early_otherwise_branch.rs:+2:24: +2:25 + _10 = (((_3.1: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:+2:24: +2:25 + _0 = const 0_u32; // scope 1 at $DIR/early_otherwise_branch.rs:+2:31: +2:32 + StorageDead(_10); // scope 0 at $DIR/early_otherwise_branch.rs:+2:31: +2:32 + StorageDead(_9); // scope 0 at $DIR/early_otherwise_branch.rs:+2:31: +2:32 +- goto -> bb6; // scope 0 at $DIR/early_otherwise_branch.rs:+2:31: +2:32 ++ goto -> bb4; // scope 0 at $DIR/early_otherwise_branch.rs:+2:31: +2:32 + } + +- bb5: { ++ bb3: { + _0 = const 0_u32; // scope 0 at $DIR/early_otherwise_branch.rs:+3:25: +3:26 +- goto -> bb6; // scope 0 at $DIR/early_otherwise_branch.rs:+3:25: +3:26 ++ goto -> bb4; // scope 0 at $DIR/early_otherwise_branch.rs:+3:25: +3:26 + } + +- bb6: { ++ bb4: { + StorageDead(_3); // scope 0 at $DIR/early_otherwise_branch.rs:+6:1: +6:2 + return; // scope 0 at $DIR/early_otherwise_branch.rs:+6:2: +6:2 ++ } ++ ++ bb5: { ++ StorageDead(_12); // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 ++ switchInt(_8) -> [0: bb3, 1: bb2, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17 + } + } + |