]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/equal_true.opt.InstCombine.diff
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / mir-opt / equal_true.opt.InstCombine.diff
1 - // MIR for `opt` before InstCombine
2 + // MIR for `opt` after InstCombine
3   
4   fn opt(_1: bool) -> i32 {
5       debug x => _1;                       // in scope 0 at $DIR/equal_true.rs:+0:8: +0:9
6       let mut _0: i32;                     // return place in scope 0 at $DIR/equal_true.rs:+0:20: +0:23
7       let mut _2: bool;                    // in scope 0 at $DIR/equal_true.rs:+1:8: +1:17
8       let mut _3: bool;                    // in scope 0 at $DIR/equal_true.rs:+1:8: +1:9
9   
10       bb0: {
11           StorageLive(_2);                 // scope 0 at $DIR/equal_true.rs:+1:8: +1:17
12           StorageLive(_3);                 // scope 0 at $DIR/equal_true.rs:+1:8: +1:9
13           _3 = _1;                         // scope 0 at $DIR/equal_true.rs:+1:8: +1:9
14 -         _2 = Eq(move _3, const true);    // scope 0 at $DIR/equal_true.rs:+1:8: +1:17
15 +         _2 = move _3;                    // scope 0 at $DIR/equal_true.rs:+1:8: +1:17
16           StorageDead(_3);                 // scope 0 at $DIR/equal_true.rs:+1:16: +1:17
17           switchInt(move _2) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/equal_true.rs:+1:8: +1:17
18       }
19   
20       bb1: {
21           _0 = const 0_i32;                // scope 0 at $DIR/equal_true.rs:+1:20: +1:21
22           goto -> bb3;                     // scope 0 at $DIR/equal_true.rs:+1:5: +1:34
23       }
24   
25       bb2: {
26           _0 = const 1_i32;                // scope 0 at $DIR/equal_true.rs:+1:31: +1:32
27           goto -> bb3;                     // scope 0 at $DIR/equal_true.rs:+1:5: +1:34
28       }
29   
30       bb3: {
31           StorageDead(_2);                 // scope 0 at $DIR/equal_true.rs:+1:33: +1:34
32           return;                          // scope 0 at $DIR/equal_true.rs:+2:2: +2:2
33       }
34   }
35