]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/const_goto_const_eval_fail.f.ConstGoto.diff
Rollup merge of #107719 - WaffleLapkin:de-arena-allocates-you-UwU, r=cjgillot
[rust.git] / tests / mir-opt / const_goto_const_eval_fail.f.ConstGoto.diff
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:+0:44: +0:47
6       let mut _1: bool;                    // in scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:11: +6:6
7       let mut _2: i32;                     // in scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:15: +2:16
8   
9       bb0: {
10           StorageLive(_1);                 // scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:11: +6:6
11           StorageLive(_2);                 // scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:15: +2:16
12           _2 = const A;                    // scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:15: +2:16
13           switchInt(_2) -> [1: bb2, 2: bb2, 3: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:9: +2:16
14       }
15   
16       bb1: {
17           _1 = const true;                 // scope 0 at $DIR/const_goto_const_eval_fail.rs:+4:18: +4:22
18           goto -> bb3;                     // scope 0 at $DIR/const_goto_const_eval_fail.rs:+4:18: +4:22
19       }
20   
21       bb2: {
22           _1 = const B;                    // scope 0 at $DIR/const_goto_const_eval_fail.rs:+3:26: +3:27
23 -         goto -> bb3;                     // scope 0 at $DIR/const_goto_const_eval_fail.rs:+3:26: +3:27
24 +         switchInt(_1) -> [0: bb4, otherwise: bb3]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:5: +6:6
25       }
26   
27       bb3: {
28 -         switchInt(_1) -> [0: bb5, otherwise: bb4]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:5: +6:6
29 -     }
30
31 -     bb4: {
32           _0 = const 2_u64;                // scope 0 at $DIR/const_goto_const_eval_fail.rs:+8:17: +8:18
33 -         goto -> bb6;                     // scope 0 at $DIR/const_goto_const_eval_fail.rs:+8:17: +8:18
34 +         goto -> bb5;                     // scope 0 at $DIR/const_goto_const_eval_fail.rs:+8:17: +8:18
35       }
36   
37 -     bb5: {
38 +     bb4: {
39           _0 = const 1_u64;                // scope 0 at $DIR/const_goto_const_eval_fail.rs:+7:18: +7:19
40 -         goto -> bb6;                     // scope 0 at $DIR/const_goto_const_eval_fail.rs:+7:18: +7:19
41 +         goto -> bb5;                     // scope 0 at $DIR/const_goto_const_eval_fail.rs:+7:18: +7:19
42       }
43   
44 -     bb6: {
45 +     bb5: {
46           StorageDead(_2);                 // scope 0 at $DIR/const_goto_const_eval_fail.rs:+10:1: +10:2
47           StorageDead(_1);                 // scope 0 at $DIR/const_goto_const_eval_fail.rs:+10:1: +10:2
48           return;                          // scope 0 at $DIR/const_goto_const_eval_fail.rs:+10:2: +10:2
49       }
50   }
51