summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.diff
blob: 0c94794fa3ffec0318aaf1020484b4d3813891f2 (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
- // MIR for `try_sum` before EarlyOtherwiseBranch
+ // MIR for `try_sum` after EarlyOtherwiseBranch
  
  fn try_sum(_1: &ViewportPercentageLength, _2: &ViewportPercentageLength) -> Result<ViewportPercentageLength, ()> {
      debug x => _1;
      debug other => _2;
      let mut _0: std::result::Result<ViewportPercentageLength, ()>;
      let mut _3: ViewportPercentageLength;
      let mut _4: (&ViewportPercentageLength, &ViewportPercentageLength);
      let mut _5: &ViewportPercentageLength;
      let mut _6: &ViewportPercentageLength;
      let mut _7: isize;
      let mut _8: isize;
      let mut _9: isize;
      let mut _10: isize;
      let mut _11: isize;
      let _12: f32;
      let _13: f32;
      let mut _14: f32;
      let mut _15: f32;
      let mut _16: f32;
      let _17: f32;
      let _18: f32;
      let mut _19: f32;
      let mut _20: f32;
      let mut _21: f32;
      let _22: f32;
      let _23: f32;
      let mut _24: f32;
      let mut _25: f32;
      let mut _26: f32;
      let _27: f32;
      let _28: f32;
      let mut _29: f32;
      let mut _30: f32;
      let mut _31: f32;
      let mut _32: !;
      let mut _33: ();
      let mut _34: &ViewportPercentageLength;
      let mut _35: &ViewportPercentageLength;
      let mut _36: &ViewportPercentageLength;
      let mut _37: &ViewportPercentageLength;
      let mut _38: &ViewportPercentageLength;
      let mut _39: &ViewportPercentageLength;
      let mut _40: &ViewportPercentageLength;
      let mut _41: &ViewportPercentageLength;
      let mut _42: &ViewportPercentageLength;
      let mut _43: &ViewportPercentageLength;
      let mut _44: &ViewportPercentageLength;
      let mut _45: &ViewportPercentageLength;
      let mut _46: &ViewportPercentageLength;
      scope 1 {
          debug one => _12;
          debug other => _13;
      }
      scope 2 {
          debug one => _17;
          debug other => _18;
      }
      scope 3 {
          debug one => _22;
          debug other => _23;
      }
      scope 4 {
          debug one => _27;
          debug other => _28;
      }
  
      bb0: {
          StorageLive(_3);
          StorageLive(_4);
          StorageLive(_5);
          _5 = _1;
          StorageLive(_6);
          _6 = _2;
          _4 = (move _5, move _6);
          StorageDead(_6);
          StorageDead(_5);
          _34 = deref_copy (_4.0: &ViewportPercentageLength);
          _11 = discriminant((*_34));
          switchInt(move _11) -> [0: bb1, 1: bb3, 2: bb4, 3: bb5, otherwise: bb2];
      }
  
      bb1: {
          _35 = deref_copy (_4.1: &ViewportPercentageLength);
          _7 = discriminant((*_35));
          switchInt(move _7) -> [0: bb6, otherwise: bb2];
      }
  
      bb2: {
          StorageLive(_33);
          _33 = ();
          _0 = Result::<ViewportPercentageLength, ()>::Err(move _33);
          StorageDead(_33);
          StorageDead(_3);
          StorageDead(_4);
          goto -> bb11;
      }
  
      bb3: {
          _36 = deref_copy (_4.1: &ViewportPercentageLength);
          _8 = discriminant((*_36));
          switchInt(move _8) -> [1: bb7, otherwise: bb2];
      }
  
      bb4: {
          _37 = deref_copy (_4.1: &ViewportPercentageLength);
          _9 = discriminant((*_37));
          switchInt(move _9) -> [2: bb8, otherwise: bb2];
      }
  
      bb5: {
          _38 = deref_copy (_4.1: &ViewportPercentageLength);
          _10 = discriminant((*_38));
          switchInt(move _10) -> [3: bb9, otherwise: bb2];
      }
  
      bb6: {
          StorageLive(_12);
          _39 = deref_copy (_4.0: &ViewportPercentageLength);
          _12 = (((*_39) as Vw).0: f32);
          StorageLive(_13);
          _40 = deref_copy (_4.1: &ViewportPercentageLength);
          _13 = (((*_40) as Vw).0: f32);
          StorageLive(_14);
          StorageLive(_15);
          _15 = _12;
          StorageLive(_16);
          _16 = _13;
          _14 = Add(move _15, move _16);
          StorageDead(_16);
          StorageDead(_15);
          _3 = ViewportPercentageLength::Vw(move _14);
          StorageDead(_14);
          StorageDead(_13);
          StorageDead(_12);
          goto -> bb10;
      }
  
      bb7: {
          StorageLive(_17);
          _41 = deref_copy (_4.0: &ViewportPercentageLength);
          _17 = (((*_41) as Vh).0: f32);
          StorageLive(_18);
          _42 = deref_copy (_4.1: &ViewportPercentageLength);
          _18 = (((*_42) as Vh).0: f32);
          StorageLive(_19);
          StorageLive(_20);
          _20 = _17;
          StorageLive(_21);
          _21 = _18;
          _19 = Add(move _20, move _21);
          StorageDead(_21);
          StorageDead(_20);
          _3 = ViewportPercentageLength::Vh(move _19);
          StorageDead(_19);
          StorageDead(_18);
          StorageDead(_17);
          goto -> bb10;
      }
  
      bb8: {
          StorageLive(_22);
          _43 = deref_copy (_4.0: &ViewportPercentageLength);
          _22 = (((*_43) as Vmin).0: f32);
          StorageLive(_23);
          _44 = deref_copy (_4.1: &ViewportPercentageLength);
          _23 = (((*_44) as Vmin).0: f32);
          StorageLive(_24);
          StorageLive(_25);
          _25 = _22;
          StorageLive(_26);
          _26 = _23;
          _24 = Add(move _25, move _26);
          StorageDead(_26);
          StorageDead(_25);
          _3 = ViewportPercentageLength::Vmin(move _24);
          StorageDead(_24);
          StorageDead(_23);
          StorageDead(_22);
          goto -> bb10;
      }
  
      bb9: {
          StorageLive(_27);
          _45 = deref_copy (_4.0: &ViewportPercentageLength);
          _27 = (((*_45) as Vmax).0: f32);
          StorageLive(_28);
          _46 = deref_copy (_4.1: &ViewportPercentageLength);
          _28 = (((*_46) as Vmax).0: f32);
          StorageLive(_29);
          StorageLive(_30);
          _30 = _27;
          StorageLive(_31);
          _31 = _28;
          _29 = Add(move _30, move _31);
          StorageDead(_31);
          StorageDead(_30);
          _3 = ViewportPercentageLength::Vmax(move _29);
          StorageDead(_29);
          StorageDead(_28);
          StorageDead(_27);
          goto -> bb10;
      }
  
      bb10: {
          _0 = Result::<ViewportPercentageLength, ()>::Ok(move _3);
          StorageDead(_3);
          StorageDead(_4);
          goto -> bb11;
      }
  
      bb11: {
          return;
      }
  }