]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/if_condition_int.opt_char.SimplifyComparisonIntegral.diff
Update upstream source from tag 'upstream/1.49.0_beta.4+dfsg1'
[rustc.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(_2) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/if-condition-int.rs:21:5: 21:33
17 + _2 = Eq(_3, const 'x'); // 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': bb2, otherwise: bb1]; // 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 1_u32; // scope 0 at $DIR/if-condition-int.rs:21:30: 21:31
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 0_u32; // scope 0 at $DIR/if-condition-int.rs:21:19: 21:20
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:22:1: 22:2
36 return; // scope 0 at $DIR/if-condition-int.rs:22:2: 22:2
37 }
38 }
39