2020-10-03 04:18:24 -05:00
|
|
|
- // MIR for `issue_77355_opt` before ConstGoto
|
|
|
|
+ // MIR for `issue_77355_opt` after ConstGoto
|
|
|
|
|
|
|
|
fn issue_77355_opt(_1: Foo) -> u64 {
|
2022-07-27 13:47:42 -05:00
|
|
|
debug num => _1; // in scope 0 at $DIR/const_goto.rs:+0:20: +0:23
|
|
|
|
let mut _0: u64; // return place in scope 0 at $DIR/const_goto.rs:+0:33: +0:36
|
2020-10-03 04:18:24 -05:00
|
|
|
- let mut _2: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2022-07-27 13:47:42 -05:00
|
|
|
- let mut _3: isize; // in scope 0 at $DIR/const_goto.rs:+1:22: +1:28
|
|
|
|
+ let mut _2: isize; // in scope 0 at $DIR/const_goto.rs:+1:22: +1:28
|
2020-10-03 04:18:24 -05:00
|
|
|
|
|
|
|
bb0: {
|
|
|
|
- StorageLive(_2); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2022-07-27 13:47:42 -05:00
|
|
|
- _3 = discriminant(_1); // scope 0 at $DIR/const_goto.rs:+1:17: +1:20
|
2022-12-03 18:03:27 -06:00
|
|
|
- switchInt(move _3) -> [1: bb2, 2: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2022-07-27 13:47:42 -05:00
|
|
|
+ _2 = discriminant(_1); // scope 0 at $DIR/const_goto.rs:+1:17: +1:20
|
2022-12-03 18:03:27 -06:00
|
|
|
+ switchInt(move _2) -> [1: bb2, 2: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2020-10-03 04:18:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
|
|
|
- _2 = const false; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2022-07-27 13:47:42 -05:00
|
|
|
+ _0 = const 42_u64; // scope 0 at $DIR/const_goto.rs:+1:53: +1:55
|
|
|
|
+ goto -> bb3; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
|
2020-10-03 04:18:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
|
|
|
- _2 = const true; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb3: {
|
2022-12-03 18:03:27 -06:00
|
|
|
- switchInt(move _2) -> [0: bb5, otherwise: bb4]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2020-10-03 04:18:24 -05:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb4: {
|
2022-07-27 13:47:42 -05:00
|
|
|
_0 = const 23_u64; // scope 0 at $DIR/const_goto.rs:+1:41: +1:43
|
|
|
|
- goto -> bb6; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
|
|
|
|
+ goto -> bb3; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
|
2020-10-03 04:18:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
- bb5: {
|
2022-07-27 13:47:42 -05:00
|
|
|
- _0 = const 42_u64; // scope 0 at $DIR/const_goto.rs:+1:53: +1:55
|
|
|
|
- goto -> bb6; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
|
2020-10-03 04:18:24 -05:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb6: {
|
2022-07-27 13:47:42 -05:00
|
|
|
- StorageDead(_2); // scope 0 at $DIR/const_goto.rs:+1:56: +1:57
|
2020-10-03 04:18:24 -05:00
|
|
|
+ bb3: {
|
2022-07-27 13:47:42 -05:00
|
|
|
return; // scope 0 at $DIR/const_goto.rs:+2:2: +2:2
|
2020-10-03 04:18:24 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|