summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/sroa/structs.flat.ScalarReplacementOfAggregates.diff
blob: a84048365a4bae1e35ea0f0a0429680667daadc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
- // MIR for `flat` before ScalarReplacementOfAggregates
+ // MIR for `flat` after ScalarReplacementOfAggregates
  
  fn flat() -> () {
      let mut _0: ();
      let _1: u8;
      let _2: ();
      let _3: &str;
      let _4: std::option::Option<isize>;
      let mut _5: Foo;
      let mut _6: ();
      let mut _7: std::option::Option<isize>;
+     let mut _8: u8;
+     let mut _9: ();
+     let mut _10: &str;
+     let mut _11: std::option::Option<isize>;
      scope 1 {
          debug a => _1;
          debug b => _2;
          debug c => _3;
          debug d => _4;
          scope 2 {
              scope 3 {
                  scope 4 {
                      scope 5 {
                      }
                  }
              }
          }
      }
  
      bb0: {
-         StorageLive(_5);
+         StorageLive(_8);
+         StorageLive(_9);
+         StorageLive(_10);
+         StorageLive(_11);
+         nop;
          StorageLive(_6);
          _6 = ();
          StorageLive(_7);
          _7 = Option::<isize>::Some(const -4_isize);
-         _5 = Foo { a: const 5_u8, b: move _6, c: const "a", d: move _7 };
+         _8 = const 5_u8;
+         _9 = move _6;
+         _10 = const "a";
+         _11 = move _7;
+         nop;
          StorageDead(_7);
          StorageDead(_6);
          StorageLive(_1);
-         _1 = (_5.0: u8);
+         _1 = _8;
          StorageLive(_2);
-         _2 = (_5.1: ());
+         _2 = _9;
          StorageLive(_3);
-         _3 = (_5.2: &str);
+         _3 = _10;
          StorageLive(_4);
-         _4 = (_5.3: std::option::Option<isize>);
-         StorageDead(_5);
+         _4 = _11;
+         StorageDead(_8);
+         StorageDead(_9);
+         StorageDead(_10);
+         StorageDead(_11);
+         nop;
          _0 = const ();
          StorageDead(_4);
          StorageDead(_3);
          StorageDead(_2);
          StorageDead(_1);
          return;
      }
  }