]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/if_condition_int.opt_char.SimplifyComparisonIntegral.diff
Auto merge of #83314 - Aaron1011:print-unstable-value, r=lcnr
[rust.git] / src / test / mir-opt / if_condition_int.opt_char.SimplifyComparisonIntegral.diff
1 - // MIR for `opt_char` before SimplifyComparisonIntegral
2 + // MIR for `opt_char` after SimplifyComparisonIntegral
3   
4   fn opt_char(_1: char) -> u32 {
5       debug x => _1;                       // in scope 0 at $DIR/if-condition-int.rs:20:13: 20:14
6       let mut _0: u32;                     // return place in scope 0 at $DIR/if-condition-int.rs:20:25: 20:28
7       let mut _2: bool;                    // in scope 0 at $DIR/if-condition-int.rs:21:8: 21:16
8       let mut _3: char;                    // in scope 0 at $DIR/if-condition-int.rs:21:8: 21:9
9   
10       bb0: {
11           StorageLive(_2);                 // scope 0 at $DIR/if-condition-int.rs:21:8: 21:16
12           StorageLive(_3);                 // scope 0 at $DIR/if-condition-int.rs:21:8: 21:9
13           _3 = _1;                         // scope 0 at $DIR/if-condition-int.rs:21:8: 21:9
14 -         _2 = Eq(move _3, const 'x');     // scope 0 at $DIR/if-condition-int.rs:21:8: 21:16
15 -         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:21:15: 21:16
16 -         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if-condition-int.rs:21:5: 21:33
17 +         nop;                             // scope 0 at $DIR/if-condition-int.rs:21:8: 21:16
18 +         nop;                             // scope 0 at $DIR/if-condition-int.rs:21:15: 21:16
19 +         switchInt(move _3) -> ['x': bb1, otherwise: bb2]; // scope 0 at $DIR/if-condition-int.rs:21:5: 21:33
20       }
21   
22       bb1: {
23 +         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:21:5: 21:33
24           _0 = const 0_u32;                // scope 0 at $DIR/if-condition-int.rs:21:19: 21:20
25           goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:21:5: 21:33
26       }
27   
28       bb2: {
29 +         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:21:5: 21:33
30           _0 = const 1_u32;                // scope 0 at $DIR/if-condition-int.rs:21:30: 21:31
31           goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:21:5: 21:33
32       }
33   
34       bb3: {
35           StorageDead(_2);                 // scope 0 at $DIR/if-condition-int.rs:21:32: 21:33
36           return;                          // scope 0 at $DIR/if-condition-int.rs:22:2: 22:2
37       }
38   }
39