Skip to content

Commit 134f3da

Browse files
committed
Unreachable propagation: preserve information about unreachable values
Unreachable propagation pass removes all unreachable terminators. As a consequence, for switch int terminators, where two or more targets remain after the optimization, where otherwise branch is reachable, switching on unreachable values will use otherwise branch after the optimization. Consequently, the information about unreachable values is irrevocably lost. To preserve the information about unreachable values, keep the existing terminator if otherwise branch is reachable. Additionally, since now unreachable blocks might remain in use, remove their statements.
1 parent 2b641de commit 134f3da

18 files changed

+170
-112
lines changed

compiler/rustc_mir/src/transform/unreachable_prop.rs

+8-13
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ impl MirPass<'_> for UnreachablePropagation {
4444
}
4545

4646
let replaced = !replacements.is_empty();
47+
for bb in unreachable_blocks {
48+
body.basic_blocks_mut()[bb].statements.clear();
49+
}
4750
for (bb, terminator_kind) in replacements {
4851
body.basic_blocks_mut()[bb].terminator_mut().kind = terminator_kind;
4952
}
50-
5153
if replaced {
5254
simplify::remove_dead_blocks(body);
5355
}
@@ -64,32 +66,25 @@ where
6466
let terminator = match *terminator_kind {
6567
TerminatorKind::Goto { target } if predicate(target) => TerminatorKind::Unreachable,
6668
TerminatorKind::SwitchInt { ref discr, switch_ty, ref values, ref targets } => {
67-
let original_targets_len = targets.len();
6869
let (otherwise, targets) = targets.split_last().unwrap();
69-
let (mut values, mut targets): (Vec<_>, Vec<_>) =
70-
values.iter().zip(targets.iter()).filter(|(_, &t)| !predicate(t)).unzip();
7170

7271
if !predicate(*otherwise) {
73-
targets.push(*otherwise);
74-
} else {
75-
values.pop();
72+
return None;
7673
}
7774

78-
let retained_targets_len = targets.len();
75+
let (values, mut targets): (Vec<_>, Vec<_>) =
76+
values.iter().zip(targets.iter()).filter(|(_, &t)| !predicate(t)).unzip();
7977

8078
if targets.is_empty() {
8179
TerminatorKind::Unreachable
82-
} else if targets.len() == 1 {
83-
TerminatorKind::Goto { target: targets[0] }
84-
} else if original_targets_len != retained_targets_len {
80+
} else {
81+
targets.push(*otherwise);
8582
TerminatorKind::SwitchInt {
8683
discr: discr.clone(),
8784
switch_ty,
8885
values: Cow::from(values),
8986
targets,
9087
}
91-
} else {
92-
return None;
9388
}
9489
}
9590
_ => return None,

src/test/mir-opt/early_otherwise_branch_noopt.noopt1.EarlyOtherwiseBranch.diff

+15-11
Original file line numberDiff line numberDiff line change
@@ -37,52 +37,56 @@
3737
StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:16: 8:17
3838
StorageDead(_4); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:16: 8:17
3939
_8 = discriminant((_3.0: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:10: 9:17
40-
switchInt(move _8) -> [0_isize: bb1, otherwise: bb3]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:10: 9:17
40+
switchInt(move _8) -> [0_isize: bb1, 1_isize: bb4, otherwise: bb3]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:10: 9:17
4141
}
4242

4343
bb1: {
4444
_6 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:11:16: 11:23
45-
switchInt(move _6) -> [0_isize: bb2, otherwise: bb6]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:11:16: 11:23
45+
switchInt(move _6) -> [0_isize: bb2, 1_isize: bb7, otherwise: bb3]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:11:16: 11:23
4646
}
4747

4848
bb2: {
4949
_0 = const 3_u32; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:12:25: 12:26
50-
goto -> bb7; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 13:6
50+
goto -> bb8; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 13:6
5151
}
5252

5353
bb3: {
54-
_7 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:19: 9:26
55-
switchInt(move _7) -> [0_isize: bb5, otherwise: bb4]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:19: 9:26
54+
unreachable; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:11: 8:17
5655
}
5756

5857
bb4: {
58+
_7 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:19: 9:26
59+
switchInt(move _7) -> [0_isize: bb6, 1_isize: bb5, otherwise: bb3]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:19: 9:26
60+
}
61+
62+
bb5: {
5963
StorageLive(_9); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:15: 9:16
6064
_9 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:15: 9:16
6165
StorageLive(_10); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:24: 9:25
6266
_10 = (((_3.1: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:24: 9:25
6367
_0 = const 0_u32; // scope 1 at $DIR/early_otherwise_branch_noopt.rs:9:31: 9:32
6468
StorageDead(_10); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:31: 9:32
6569
StorageDead(_9); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:31: 9:32
66-
goto -> bb7; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 13:6
70+
goto -> bb8; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 13:6
6771
}
6872

69-
bb5: {
73+
bb6: {
7074
StorageLive(_11); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:10:15: 10:16
7175
_11 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:10:15: 10:16
7276
_0 = const 1_u32; // scope 2 at $DIR/early_otherwise_branch_noopt.rs:10:28: 10:29
7377
StorageDead(_11); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:10:28: 10:29
74-
goto -> bb7; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 13:6
78+
goto -> bb8; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 13:6
7579
}
7680

77-
bb6: {
81+
bb7: {
7882
StorageLive(_12); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:11:21: 11:22
7983
_12 = (((_3.1: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:11:21: 11:22
8084
_0 = const 2_u32; // scope 3 at $DIR/early_otherwise_branch_noopt.rs:11:28: 11:29
8185
StorageDead(_12); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:11:28: 11:29
82-
goto -> bb7; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 13:6
86+
goto -> bb8; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 13:6
8387
}
8488

85-
bb7: {
89+
bb8: {
8690
StorageDead(_3); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:14:1: 14:2
8791
return; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:14:2: 14:2
8892
}

src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff

+16-12
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
100100
discriminant(_2) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
101101
_3 = const 1_isize; // scope 0 at $DIR/issue-73223.rs:3:9: 3:16
102-
goto -> bb2; // scope 0 at $DIR/issue-73223.rs:3:9: 3:16
102+
goto -> bb3; // scope 0 at $DIR/issue-73223.rs:3:9: 3:16
103103
}
104104

105105
bb1: {
@@ -110,6 +110,10 @@
110110
}
111111

112112
bb2: {
113+
unreachable; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
114+
}
115+
116+
bb3: {
113117
StorageLive(_4); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
114118
_4 = ((_2 as Some).0: i32); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
115119
_1 = _4; // scope 2 at $DIR/issue-73223.rs:3:20: 3:21
@@ -153,10 +157,10 @@
153157
StorageDead(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
154158
_15 = Not(move _16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
155159
StorageDead(_16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
156-
switchInt(_15) -> [false: bb3, otherwise: bb4]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
160+
switchInt(_15) -> [false: bb4, otherwise: bb5]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
157161
}
158162

159-
bb3: {
163+
bb4: {
160164
_8 = const (); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
161165
StorageDead(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
162166
StorageDead(_14); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@@ -169,7 +173,7 @@
169173
return; // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
170174
}
171175

172-
bb4: {
176+
bb5: {
173177
StorageLive(_19); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
174178
StorageLive(_20); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
175179
StorageLive(_21); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
@@ -220,24 +224,24 @@
220224
StorageLive(_46); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
221225
StorageLive(_47); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
222226
_47 = _40; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
223-
_46 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _47) -> bb5; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
227+
_46 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _47) -> bb6; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
224228
// mir::Constant
225229
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
226230
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
227231
}
228232

229-
bb5: {
233+
bb6: {
230234
StorageDead(_47); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
231235
StorageLive(_48); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
232236
StorageLive(_49); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
233237
_49 = _39; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
234-
_48 = transmute::<&&i32, &core::fmt::Opaque>(move _49) -> bb6; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
238+
_48 = transmute::<&&i32, &core::fmt::Opaque>(move _49) -> bb7; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
235239
// mir::Constant
236240
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
237241
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar(<ZST>)) }
238242
}
239243

240-
bb6: {
244+
bb7: {
241245
StorageDead(_49); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
242246
(_38.0: &core::fmt::Opaque) = move _48; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
243247
(_38.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _46; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
@@ -256,24 +260,24 @@
256260
StorageLive(_50); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
257261
StorageLive(_51); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
258262
_51 = _43; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
259-
_50 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _51) -> bb7; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
263+
_50 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _51) -> bb8; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
260264
// mir::Constant
261265
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
262266
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
263267
}
264268

265-
bb7: {
269+
bb8: {
266270
StorageDead(_51); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
267271
StorageLive(_52); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
268272
StorageLive(_53); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
269273
_53 = _42; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
270-
_52 = transmute::<&&i32, &core::fmt::Opaque>(move _53) -> bb8; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
274+
_52 = transmute::<&&i32, &core::fmt::Opaque>(move _53) -> bb9; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
271275
// mir::Constant
272276
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
273277
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar(<ZST>)) }
274278
}
275279

276-
bb8: {
280+
bb9: {
277281
StorageDead(_53); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
278282
(_41.0: &core::fmt::Opaque) = move _52; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
279283
(_41.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _50; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL

src/test/mir-opt/matches_u8.exhaustive_match.MatchBranchSimplification.64bit.diff

+8-4
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,24 @@
88

99
bb0: {
1010
_2 = discriminant(_1); // scope 0 at $DIR/matches_u8.rs:13:9: 13:13
11-
switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_u8.rs:13:9: 13:13
11+
switchInt(move _2) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/matches_u8.rs:13:9: 13:13
1212
}
1313

1414
bb1: {
1515
_0 = const 1_u8; // scope 0 at $DIR/matches_u8.rs:14:17: 14:18
16-
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6
16+
goto -> bb4; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6
1717
}
1818

1919
bb2: {
20-
_0 = const 0_u8; // scope 0 at $DIR/matches_u8.rs:13:17: 13:18
21-
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6
20+
unreachable; // scope 0 at $DIR/matches_u8.rs:12:11: 12:12
2221
}
2322

2423
bb3: {
24+
_0 = const 0_u8; // scope 0 at $DIR/matches_u8.rs:13:17: 13:18
25+
goto -> bb4; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6
26+
}
27+
28+
bb4: {
2529
return; // scope 0 at $DIR/matches_u8.rs:16:2: 16:2
2630
}
2731
}

src/test/mir-opt/matches_u8.exhaustive_match_i8.MatchBranchSimplification.64bit.diff

+8-4
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,24 @@
88

99
bb0: {
1010
_2 = discriminant(_1); // scope 0 at $DIR/matches_u8.rs:21:9: 21:13
11-
switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_u8.rs:21:9: 21:13
11+
switchInt(move _2) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/matches_u8.rs:21:9: 21:13
1212
}
1313

1414
bb1: {
1515
_0 = const 1_i8; // scope 0 at $DIR/matches_u8.rs:22:17: 22:18
16-
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6
16+
goto -> bb4; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6
1717
}
1818

1919
bb2: {
20-
_0 = const 0_i8; // scope 0 at $DIR/matches_u8.rs:21:17: 21:18
21-
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6
20+
unreachable; // scope 0 at $DIR/matches_u8.rs:20:11: 20:12
2221
}
2322

2423
bb3: {
24+
_0 = const 0_i8; // scope 0 at $DIR/matches_u8.rs:21:17: 21:18
25+
goto -> bb4; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6
26+
}
27+
28+
bb4: {
2529
return; // scope 0 at $DIR/matches_u8.rs:24:2: 24:2
2630
}
2731
}

src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff

+8-4
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,19 @@
1414

1515
bb0: {
1616
_2 = discriminant(_1); // scope 0 at $DIR/simplify-arm.rs:11:9: 11:16
17-
switchInt(move _2) -> [0_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:11:9: 11:16
17+
switchInt(move _2) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:11:9: 11:16
1818
}
1919

2020
bb1: {
2121
discriminant(_0) = 0; // scope 0 at $DIR/simplify-arm.rs:12:17: 12:21
22-
goto -> bb3; // scope 0 at $DIR/simplify-arm.rs:10:5: 13:6
22+
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:10:5: 13:6
2323
}
2424

2525
bb2: {
26+
unreachable; // scope 0 at $DIR/simplify-arm.rs:10:11: 10:12
27+
}
28+
29+
bb3: {
2630
- StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
2731
- _3 = ((_1 as Some).0: u8); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
2832
- StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
@@ -32,10 +36,10 @@
3236
- StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:11:26: 11:27
3337
- StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:11:26: 11:27
3438
+ _0 = move _1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
35-
goto -> bb3; // scope 0 at $DIR/simplify-arm.rs:10:5: 13:6
39+
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:10:5: 13:6
3640
}
3741

38-
bb3: {
42+
bb4: {
3943
return; // scope 0 at $DIR/simplify-arm.rs:14:2: 14:2
4044
}
4145
}

0 commit comments

Comments
 (0)