rust/src/test/mir-opt/early_otherwise_branch_3_element_tuple.opt1.EarlyOtherwiseBranch.diff

118 lines
9.8 KiB
Diff
Raw Normal View History

- // MIR for `opt1` before EarlyOtherwiseBranch
+ // MIR for `opt1` after EarlyOtherwiseBranch
fn opt1(_1: std::option::Option<usize>, _2: std::option::Option<usize>, _3: std::option::Option<usize>) -> usize {
debug x => _1; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:9: 5:10
debug y => _2; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:27: 5:28
debug z => _3; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:44: 5:45
let mut _0: usize; // return place in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:64: 5:69
let mut _4: (std::option::Option<usize>, std::option::Option<usize>, std::option::Option<usize>); // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:11: 6:18
let mut _5: std::option::Option<usize>; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:12: 6:13
let mut _6: std::option::Option<usize>; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:14: 6:15
let mut _7: std::option::Option<usize>; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:16: 6:17
let mut _8: isize; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:28: 7:35
let mut _9: isize; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
let mut _10: isize; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:10: 7:17
let _11: usize; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:15: 7:16
let _12: usize; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:24: 7:25
let _13: usize; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:33: 7:34
+ let mut _14: isize; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
+ let mut _15: bool; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
+ let mut _16: isize; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:28: 7:35
+ let mut _17: bool; // in scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:28: 7:35
scope 1 {
debug a => _11; // in scope 1 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:15: 7:16
debug b => _12; // in scope 1 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:24: 7:25
debug c => _13; // in scope 1 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:33: 7:34
}
bb0: {
StorageLive(_4); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:11: 6:18
StorageLive(_5); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:12: 6:13
_5 = _1; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:12: 6:13
StorageLive(_6); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:14: 6:15
_6 = _2; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:14: 6:15
StorageLive(_7); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:16: 6:17
_7 = _3; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:16: 6:17
(_4.0: std::option::Option<usize>) = move _5; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:11: 6:18
(_4.1: std::option::Option<usize>) = move _6; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:11: 6:18
(_4.2: std::option::Option<usize>) = move _7; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:11: 6:18
StorageDead(_7); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:17: 6:18
StorageDead(_6); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:17: 6:18
StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:17: 6:18
_10 = discriminant((_4.0: std::option::Option<usize>)); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:10: 7:17
- switchInt(move _10) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:10: 7:17
+ StorageLive(_14); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:10: 7:17
+ _14 = discriminant((_4.1: std::option::Option<usize>)); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:10: 7:17
+ StorageLive(_15); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:10: 7:17
+ _15 = Ne(_14, _10); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:10: 7:17
+ StorageDead(_14); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:10: 7:17
+ switchInt(move _15) -> [false: bb7, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:10: 7:17
}
bb1: {
_0 = const 1_usize; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:8:14: 8:15
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000001))
// mir::Constant
// + span: $DIR/early_otherwise_branch_3_element_tuple.rs:8:14: 8:15
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
goto -> bb5; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:5: 9:6
}
bb2: {
_9 = discriminant((_4.1: std::option::Option<usize>)); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
- switchInt(move _9) -> [1_isize: bb3, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
+ StorageLive(_16); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
+ _16 = discriminant((_4.2: std::option::Option<usize>)); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
+ StorageLive(_17); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
+ _17 = Ne(_16, _9); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
+ StorageDead(_16); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
+ switchInt(move _17) -> [false: bb8, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
}
bb3: {
_8 = discriminant((_4.2: std::option::Option<usize>)); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:28: 7:35
switchInt(move _8) -> [1_isize: bb4, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:28: 7:35
}
bb4: {
StorageLive(_11); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:15: 7:16
_11 = (((_4.0: std::option::Option<usize>) as Some).0: usize); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:15: 7:16
StorageLive(_12); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:24: 7:25
_12 = (((_4.1: std::option::Option<usize>) as Some).0: usize); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:24: 7:25
StorageLive(_13); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:33: 7:34
_13 = (((_4.2: std::option::Option<usize>) as Some).0: usize); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:33: 7:34
_0 = const 0_usize; // scope 1 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:40: 7:41
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000000))
// mir::Constant
// + span: $DIR/early_otherwise_branch_3_element_tuple.rs:7:40: 7:41
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) }
StorageDead(_13); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:40: 7:41
StorageDead(_12); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:40: 7:41
StorageDead(_11); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:40: 7:41
goto -> bb5; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:5: 9:6
}
bb5: {
StorageDead(_4); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:10:1: 10:2
return; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:10:2: 10:2
+ }
+
+ bb6 (cleanup): {
+ resume; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:1: 10:2
+ }
+
+ bb7: {
+ switchInt(_10) -> [1_isize: bb3, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:19: 7:26
+ }
+
+ bb8: {
+ switchInt(_9) -> [1_isize: bb4, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:7:28: 7:35
}
}