fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.0 KiB47 linesraw
1- // MIR for `maybe_dead` before ReferencePropagation
2+ // MIR for `maybe_dead` after ReferencePropagation
3  
4  fn maybe_dead(_1: bool) -> () {
5      let mut _0: ();
6      let mut _2: i32;
7      let mut _3: i32;
8      let mut _4: &i32;
9      let mut _5: &mut i32;
10      let mut _6: i32;
11      let mut _7: i32;
12      let mut _8: i32;
13  
14      bb0: {
15          StorageLive(_2);
16          StorageLive(_3);
17          _2 = const 5_i32;
18          _3 = const 5_i32;
19          _4 = &_2;
20          _5 = &mut _3;
21          (*_5) = const 7_i32;
22-         _6 = (*_4);
23+         _6 = _2;
24          switchInt(_1) -> [1: bb1, otherwise: bb2];
25      }
26  
27      bb1: {
28          StorageDead(_2);
29          StorageDead(_3);
30          _0 = opaque::<i32>(_6) -> [return: bb2, unwind continue];
31      }
32  
33      bb2: {
34          _7 = (*_4);
35          _0 = opaque::<i32>(_7) -> [return: bb3, unwind continue];
36      }
37  
38      bb3: {
39          _8 = (*_5);
40          _0 = opaque::<i32>(_8) -> [return: bb4, unwind continue];
41      }
42  
43      bb4: {
44          return;
45      }
46  }
47