]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/if_condition_int.opt_multiple_ifs.SimplifyComparisonIntegral.diff
Auto merge of #96978 - lqd:win_pgo2, r=Mark-Simulacrum
[rust.git] / src / test / mir-opt / if_condition_int.opt_multiple_ifs.SimplifyComparisonIntegral.diff
1 - // MIR for `opt_multiple_ifs` before SimplifyComparisonIntegral
2 + // MIR for `opt_multiple_ifs` after SimplifyComparisonIntegral
3   
4   fn opt_multiple_ifs(_1: u32) -> u32 {
5       debug x => _1;                       // in scope 0 at $DIR/if-condition-int.rs:32:21: 32:22
6       let mut _0: u32;                     // return place in scope 0 at $DIR/if-condition-int.rs:32:32: 32:35
7       let mut _2: bool;                    // in scope 0 at $DIR/if-condition-int.rs:33:8: 33:15
8       let mut _3: u32;                     // in scope 0 at $DIR/if-condition-int.rs:33:8: 33:9
9       let mut _4: bool;                    // in scope 0 at $DIR/if-condition-int.rs:35:15: 35:22
10       let mut _5: u32;                     // in scope 0 at $DIR/if-condition-int.rs:35:15: 35:16
11   
12       bb0: {
13           StorageLive(_2);                 // scope 0 at $DIR/if-condition-int.rs:33:8: 33:15
14           StorageLive(_3);                 // scope 0 at $DIR/if-condition-int.rs:33:8: 33:9
15           _3 = _1;                         // scope 0 at $DIR/if-condition-int.rs:33:8: 33:9
16 -         _2 = Eq(move _3, const 42_u32);  // scope 0 at $DIR/if-condition-int.rs:33:8: 33:15
17 -         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:33:14: 33:15
18 -         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if-condition-int.rs:33:8: 33:15
19 +         nop;                             // scope 0 at $DIR/if-condition-int.rs:33:8: 33:15
20 +         nop;                             // scope 0 at $DIR/if-condition-int.rs:33:14: 33:15
21 +         switchInt(move _3) -> [42_u32: bb1, otherwise: bb2]; // scope 0 at $DIR/if-condition-int.rs:33:8: 33:15
22       }
23   
24       bb1: {
25 +         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:33:8: 33:15
26           _0 = const 0_u32;                // scope 0 at $DIR/if-condition-int.rs:34:9: 34:10
27           goto -> bb6;                     // scope 0 at $DIR/if-condition-int.rs:33:5: 39:6
28       }
29   
30       bb2: {
31 +         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:33:8: 33:15
32           StorageLive(_4);                 // scope 0 at $DIR/if-condition-int.rs:35:15: 35:22
33           StorageLive(_5);                 // scope 0 at $DIR/if-condition-int.rs:35:15: 35:16
34           _5 = _1;                         // scope 0 at $DIR/if-condition-int.rs:35:15: 35:16
35 -         _4 = Ne(move _5, const 21_u32);  // scope 0 at $DIR/if-condition-int.rs:35:15: 35:22
36 -         StorageDead(_5);                 // scope 0 at $DIR/if-condition-int.rs:35:21: 35:22
37 -         switchInt(move _4) -> [false: bb4, otherwise: bb3]; // scope 0 at $DIR/if-condition-int.rs:35:15: 35:22
38 +         nop;                             // scope 0 at $DIR/if-condition-int.rs:35:15: 35:22
39 +         nop;                             // scope 0 at $DIR/if-condition-int.rs:35:21: 35:22
40 +         switchInt(move _5) -> [21_u32: bb4, otherwise: bb3]; // scope 0 at $DIR/if-condition-int.rs:35:15: 35:22
41       }
42   
43       bb3: {
44 +         StorageDead(_5);                 // scope 0 at $DIR/if-condition-int.rs:35:15: 35:22
45           _0 = const 1_u32;                // scope 0 at $DIR/if-condition-int.rs:36:9: 36:10
46           goto -> bb5;                     // scope 0 at $DIR/if-condition-int.rs:35:12: 39:6
47       }
48   
49       bb4: {
50 +         StorageDead(_5);                 // scope 0 at $DIR/if-condition-int.rs:35:15: 35:22
51           _0 = const 2_u32;                // scope 0 at $DIR/if-condition-int.rs:38:9: 38:10
52           goto -> bb5;                     // scope 0 at $DIR/if-condition-int.rs:35:12: 39:6
53       }
54   
55       bb5: {
56           StorageDead(_4);                 // scope 0 at $DIR/if-condition-int.rs:39:5: 39:6
57           goto -> bb6;                     // scope 0 at $DIR/if-condition-int.rs:33:5: 39:6
58       }
59   
60       bb6: {
61           StorageDead(_2);                 // scope 0 at $DIR/if-condition-int.rs:39:5: 39:6
62           return;                          // scope 0 at $DIR/if-condition-int.rs:40:2: 40:2
63       }
64   }
65