fork/rust

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

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

master
1.0 KiB56 linesraw
1- // MIR for `foo` before CopyProp
2+ // MIR for `foo` after CopyProp
3  
4  fn foo() -> i32 {
5      let mut _0: i32;
6      let _1: i32;
7      let mut _3: bool;
8      let _4: i32;
9      scope 1 {
10          debug x => _1;
11          let _2: i32;
12          scope 2 {
13              debug y => _2;
14          }
15      }
16  
17      bb0: {
18          StorageLive(_1);
19          _1 = val() -> [return: bb1, unwind continue];
20      }
21  
22      bb1: {
23          StorageLive(_2);
24          StorageLive(_3);
25          _3 = cond() -> [return: bb2, unwind continue];
26      }
27  
28      bb2: {
29          switchInt(move _3) -> [0: bb4, otherwise: bb3];
30      }
31  
32      bb3: {
33          _2 = _1;
34          goto -> bb6;
35      }
36  
37      bb4: {
38          StorageLive(_4);
39          _4 = val() -> [return: bb5, unwind continue];
40      }
41  
42      bb5: {
43          StorageDead(_4);
44          _2 = _1;
45          goto -> bb6;
46      }
47  
48      bb6: {
49          StorageDead(_3);
50          _0 = _2;
51          StorageDead(_2);
52          StorageDead(_1);
53          return;
54      }
55  }
56