|
| 1 | +- // MIR for `f` before ConstGoto |
| 2 | ++ // MIR for `f` after ConstGoto |
| 3 | + |
| 4 | + fn f() -> u64 { |
| 5 | + let mut _0: u64; // return place in scope 0 at $DIR/const_goto_const_eval_fail.rs:6:44: 6:47 |
| 6 | + let mut _1: bool; // in scope 0 at $DIR/const_goto_const_eval_fail.rs:7:11: 12:6 |
| 7 | + let mut _2: i32; // in scope 0 at $DIR/const_goto_const_eval_fail.rs:8:15: 8:16 |
| 8 | + |
| 9 | + bb0: { |
| 10 | + StorageLive(_1); // scope 0 at $DIR/const_goto_const_eval_fail.rs:7:11: 12:6 |
| 11 | + StorageLive(_2); // scope 0 at $DIR/const_goto_const_eval_fail.rs:8:15: 8:16 |
| 12 | + _2 = const A; // scope 0 at $DIR/const_goto_const_eval_fail.rs:8:15: 8:16 |
| 13 | + switchInt(_2) -> [1_i32: bb2, 2_i32: bb2, 3_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:9:13: 9:14 |
| 14 | + } |
| 15 | + |
| 16 | + bb1: { |
| 17 | + _1 = const true; // scope 0 at $DIR/const_goto_const_eval_fail.rs:10:18: 10:22 |
| 18 | + goto -> bb3; // scope 0 at $DIR/const_goto_const_eval_fail.rs:8:9: 11:10 |
| 19 | + } |
| 20 | + |
| 21 | + bb2: { |
| 22 | + _1 = const B; // scope 0 at $DIR/const_goto_const_eval_fail.rs:9:26: 9:27 |
| 23 | +- goto -> bb3; // scope 0 at $DIR/const_goto_const_eval_fail.rs:8:9: 11:10 |
| 24 | ++ switchInt(_1) -> [false: bb4, otherwise: bb3]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:13:9: 13:14 |
| 25 | + } |
| 26 | + |
| 27 | + bb3: { |
| 28 | +- switchInt(_1) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:13:9: 13:14 |
| 29 | +- } |
| 30 | +- |
| 31 | +- bb4: { |
| 32 | + _0 = const 2_u64; // scope 0 at $DIR/const_goto_const_eval_fail.rs:14:17: 14:18 |
| 33 | +- goto -> bb6; // scope 0 at $DIR/const_goto_const_eval_fail.rs:7:5: 15:6 |
| 34 | ++ goto -> bb5; // scope 0 at $DIR/const_goto_const_eval_fail.rs:7:5: 15:6 |
| 35 | + } |
| 36 | + |
| 37 | +- bb5: { |
| 38 | ++ bb4: { |
| 39 | + _0 = const 1_u64; // scope 0 at $DIR/const_goto_const_eval_fail.rs:13:18: 13:19 |
| 40 | +- goto -> bb6; // scope 0 at $DIR/const_goto_const_eval_fail.rs:7:5: 15:6 |
| 41 | ++ goto -> bb5; // scope 0 at $DIR/const_goto_const_eval_fail.rs:7:5: 15:6 |
| 42 | + } |
| 43 | + |
| 44 | +- bb6: { |
| 45 | ++ bb5: { |
| 46 | + StorageDead(_2); // scope 0 at $DIR/const_goto_const_eval_fail.rs:16:1: 16:2 |
| 47 | + StorageDead(_1); // scope 0 at $DIR/const_goto_const_eval_fail.rs:16:1: 16:2 |
| 48 | + return; // scope 0 at $DIR/const_goto_const_eval_fail.rs:16:2: 16:2 |
| 49 | + } |
| 50 | + } |
| 51 | + |
0 commit comments