]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/const_goto.issue_77355_opt.ConstGoto.diff
Rollup merge of #107596 - Kobzol:stage-build-timer, r=Mark-Simulacrum
[rust.git] / tests / mir-opt / const_goto.issue_77355_opt.ConstGoto.diff
1 - // MIR for `issue_77355_opt` before ConstGoto
2 + // MIR for `issue_77355_opt` after ConstGoto
3   
4   fn issue_77355_opt(_1: Foo) -> u64 {
5       debug num => _1;                     // in scope 0 at $DIR/const_goto.rs:+0:20: +0:23
6       let mut _0: u64;                     // return place in scope 0 at $DIR/const_goto.rs:+0:33: +0:36
7 -     let mut _2: bool;                    // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
8 -     let mut _3: isize;                   // in scope 0 at $DIR/const_goto.rs:+1:22: +1:28
9 +     let mut _2: isize;                   // in scope 0 at $DIR/const_goto.rs:+1:22: +1:28
10   
11       bb0: {
12 -         StorageLive(_2);                 // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
13 -         _3 = discriminant(_1);           // scope 0 at $DIR/const_goto.rs:+1:17: +1:20
14 -         switchInt(move _3) -> [1: bb2, 2: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
15 +         _2 = discriminant(_1);           // scope 0 at $DIR/const_goto.rs:+1:17: +1:20
16 +         switchInt(move _2) -> [1: bb2, 2: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
17       }
18   
19       bb1: {
20 -         _2 = const false;                // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
21 -         goto -> bb3;                     // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
22 +         _0 = const 42_u64;               // scope 0 at $DIR/const_goto.rs:+1:53: +1:55
23 +         goto -> bb3;                     // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
24       }
25   
26       bb2: {
27 -         _2 = const true;                 // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
28 -         goto -> bb3;                     // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
29 -     }
30
31 -     bb3: {
32 -         switchInt(move _2) -> [0: bb5, otherwise: bb4]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
33 -     }
34
35 -     bb4: {
36           _0 = const 23_u64;               // scope 0 at $DIR/const_goto.rs:+1:41: +1:43
37 -         goto -> bb6;                     // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
38 +         goto -> bb3;                     // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
39       }
40   
41 -     bb5: {
42 -         _0 = const 42_u64;               // scope 0 at $DIR/const_goto.rs:+1:53: +1:55
43 -         goto -> bb6;                     // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
44 -     }
45
46 -     bb6: {
47 -         StorageDead(_2);                 // scope 0 at $DIR/const_goto.rs:+1:56: +1:57
48 +     bb3: {
49           return;                          // scope 0 at $DIR/const_goto.rs:+2:2: +2:2
50       }
51   }
52