fork/rust

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

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

master
2.1 KiB86 linesraw
1- // MIR for `main` before SimplifyLocals-before-const-prop
2+ // MIR for `main` after SimplifyLocals-before-const-prop
3  
4  fn main() -> () {
5      let mut _0: ();
6-     let mut _1: ((), ());
7-     let mut _2: ();
8+     let _1: ();
9+     let mut _2: ((), ());
10      let mut _3: ();
11-     let _4: ();
12-     let mut _5: ((), ());
13-     let mut _6: ();
14-     let mut _7: ();
15-     let _8: ();
16-     let mut _9: u8;
17-     let mut _10: u8;
18-     let mut _11: Temp;
19+     let mut _4: ();
20+     let _5: ();
21+     let mut _6: u8;
22+     let mut _7: u8;
23+     let mut _8: Temp;
24      scope 1 {
25      }
26  
27      bb0: {
28          StorageLive(_1);
29          StorageLive(_2);
30-         _2 = ();
31          StorageLive(_3);
32          _3 = ();
33-         _1 = (move _2, move _3);
34+         StorageLive(_4);
35+         _4 = ();
36+         _2 = (move _3, move _4);
37+         StorageDead(_4);
38          StorageDead(_3);
39+         _1 = use_zst(move _2) -> [return: bb1, unwind continue];
40+     }
41+ 
42+     bb1: {
43          StorageDead(_2);
44          StorageDead(_1);
45-         StorageLive(_4);
46          StorageLive(_5);
47          StorageLive(_6);
48-         _6 = ();
49          StorageLive(_7);
50-         _7 = ();
51-         _5 = (move _6, move _7);
52+         StorageLive(_8);
53+         _8 = Temp { x: const 40_u8 };
54+         _7 = (_8.0: u8);
55+         _6 = Add(move _7, const 2_u8);
56          StorageDead(_7);
57-         StorageDead(_6);
58-         _4 = use_zst(move _5) -> [return: bb1, unwind continue];
59+         _5 = use_u8(move _6) -> [return: bb2, unwind continue];
60      }
61  
62-     bb1: {
63-         StorageDead(_5);
64-         StorageDead(_4);
65-         StorageLive(_8);
66-         StorageLive(_9);
67-         StorageLive(_10);
68-         StorageLive(_11);
69-         _11 = Temp { x: const 40_u8 };
70-         _10 = (_11.0: u8);
71-         _9 = Add(move _10, const 2_u8);
72-         StorageDead(_10);
73-         _8 = use_u8(move _9) -> [return: bb2, unwind continue];
74-     }
75- 
76      bb2: {
77-         StorageDead(_9);
78-         StorageDead(_11);
79+         StorageDead(_6);
80          StorageDead(_8);
81+         StorageDead(_5);
82          _0 = const ();
83          return;
84      }
85  }
86