Skip to content

Commit b9d0ea9

Browse files
committed
[mir-opt] Introduce a new flag to enable experimental/unsound mir opts
1 parent 7f7a1cb commit b9d0ea9

20 files changed

+397
-359
lines changed

compiler/rustc_mir/src/transform/copy_prop.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ pub struct CopyPropagation;
3131

3232
impl<'tcx> MirPass<'tcx> for CopyPropagation {
3333
fn run_pass(&self, tcx: TyCtxt<'tcx>, _source: MirSource<'tcx>, body: &mut Body<'tcx>) {
34+
let opts = &tcx.sess.opts.debugging_opts;
3435
// We only run when the MIR optimization level is > 1.
3536
// This avoids a slow pass, and messing up debug info.
36-
if tcx.sess.opts.debugging_opts.mir_opt_level <= 1 {
37+
// FIXME(76740): This optimization is buggy and can cause unsoundness.
38+
if opts.mir_opt_level <= 1 || !opts.unsound_mir_opts {
3739
return;
3840
}
3941

compiler/rustc_session/src/options.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
11151115
`hir,typed` (HIR with types for each node),
11161116
`hir-tree` (dump the raw HIR),
11171117
`mir` (the MIR), or `mir-cfg` (graphviz formatted MIR)"),
1118+
unsound_mir_opts: bool = (false, parse_bool, [TRACKED],
1119+
"enable unsound and buggy MIR optimizations (default: no)"),
11181120
unstable_options: bool = (false, parse_bool, [UNTRACKED],
11191121
"adds unstable command line options to rustc interface (default: no)"),
11201122
use_ctors_section: Option<bool> = (None, parse_opt_bool, [TRACKED],

src/test/mir-opt/copy_propagation.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// compile-flags: -Zunsound-mir-opts
12
// EMIT_MIR copy_propagation.test.CopyPropagation.diff
23

34
fn test(x: u32) -> u32 {

src/test/mir-opt/copy_propagation.test.CopyPropagation.diff

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
+ // MIR for `test` after CopyPropagation
33

44
fn test(_1: u32) -> u32 {
5-
debug x => _1; // in scope 0 at $DIR/copy_propagation.rs:3:9: 3:10
6-
let mut _0: u32; // return place in scope 0 at $DIR/copy_propagation.rs:3:20: 3:23
7-
let _2: u32; // in scope 0 at $DIR/copy_propagation.rs:4:9: 4:10
5+
debug x => _1; // in scope 0 at $DIR/copy_propagation.rs:4:9: 4:10
6+
let mut _0: u32; // return place in scope 0 at $DIR/copy_propagation.rs:4:20: 4:23
7+
let _2: u32; // in scope 0 at $DIR/copy_propagation.rs:5:9: 5:10
88
scope 1 {
9-
debug y => _0; // in scope 1 at $DIR/copy_propagation.rs:4:9: 4:10
9+
debug y => _0; // in scope 1 at $DIR/copy_propagation.rs:5:9: 5:10
1010
}
1111

1212
bb0: {
13-
nop; // scope 0 at $DIR/copy_propagation.rs:4:9: 4:10
14-
_0 = _1; // scope 0 at $DIR/copy_propagation.rs:4:13: 4:14
15-
nop; // scope 1 at $DIR/copy_propagation.rs:5:5: 5:6
16-
nop; // scope 0 at $DIR/copy_propagation.rs:6:1: 6:2
17-
return; // scope 0 at $DIR/copy_propagation.rs:6:2: 6:2
13+
nop; // scope 0 at $DIR/copy_propagation.rs:5:9: 5:10
14+
_0 = _1; // scope 0 at $DIR/copy_propagation.rs:5:13: 5:14
15+
nop; // scope 1 at $DIR/copy_propagation.rs:6:5: 6:6
16+
nop; // scope 0 at $DIR/copy_propagation.rs:7:1: 7:2
17+
return; // scope 0 at $DIR/copy_propagation.rs:7:2: 7:2
1818
}
1919
}
2020

src/test/mir-opt/early_otherwise_branch_68867.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ignore-tidy-linelength
2-
// compile-flags: -Z mir-opt-level=3
2+
// compile-flags: -Z mir-opt-level=3 -Zunsound-mir-opts
33

44
// example from #68867
55
type CSSFloat = f32;

src/test/mir-opt/inline/inline-any-operand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z span_free_formats
1+
// compile-flags: -Z span_free_formats -Zunsound-mir-opts
22

33
// Tests that MIR inliner works for any operand
44

src/test/mir-opt/inline/inline-closure-borrows-arg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z span_free_formats
1+
// compile-flags: -Z span_free_formats -Zunsound-mir-opts
22

33
// Tests that MIR inliner can handle closure arguments,
44
// even when (#45894)

src/test/mir-opt/inline/inline-trait-method_2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z span_free_formats -Z mir-opt-level=3
1+
// compile-flags: -Z span_free_formats -Z mir-opt-level=3 -Zunsound-mir-opts
22

33
// EMIT_MIR inline_trait_method_2.test2.Inline.after.mir
44
fn test2(x: &dyn X) -> bool {

src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff

+111-96
Large diffs are not rendered by default.

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

+111-96
Large diffs are not rendered by default.

src/test/mir-opt/nrvo-simple.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Zmir-opt-level=1
1+
// compile-flags: -Zmir-opt-level=1 -Zunsound-mir-opts
22

33
// EMIT_MIR nrvo_simple.nrvo.RenameReturnPlace.diff
44
fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] {

src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -Zunsound-mir-opts
2+
13
fn map(x: Option<Box<()>>) -> Option<Box<()>> {
24
match x {
35
None => None,

src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.32bit.diff

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
+ // MIR for `map` after SimplifyLocals
33

44
fn map(_1: Option<Box<()>>) -> Option<Box<()>> {
5-
debug x => _1; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:8: 1:9
6-
let mut _0: std::option::Option<std::boxed::Box<()>>; // return place in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:31: 1:46
7-
- let mut _2: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
8-
- let _3: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:14: 4:15
9-
- let mut _4: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:25: 4:26
10-
- let mut _5: bool; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
11-
- let mut _6: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
12-
- let mut _7: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
5+
debug x => _1; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:8: 3:9
6+
let mut _0: std::option::Option<std::boxed::Box<()>>; // return place in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:31: 3:46
7+
- let mut _2: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
8+
- let _3: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:14: 6:15
9+
- let mut _4: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:25: 6:26
10+
- let mut _5: bool; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
11+
- let mut _6: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
12+
- let mut _7: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
1313
scope 1 {
14-
debug x => ((_0 as Some).0: std::boxed::Box<()>); // in scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:14: 4:15
14+
debug x => ((_0 as Some).0: std::boxed::Box<()>); // in scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:14: 6:15
1515
}
1616

1717
bb0: {
18-
- _5 = const false; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
19-
- _5 = const true; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
20-
- _2 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
21-
_0 = move _1; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:20: 4:27
22-
- _6 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
23-
return; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:2: 6:2
18+
- _5 = const false; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
19+
- _5 = const true; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
20+
- _2 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
21+
_0 = move _1; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:20: 6:27
22+
- _6 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
23+
return; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:2: 8:2
2424
}
2525
}
2626

src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.64bit.diff

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
+ // MIR for `map` after SimplifyLocals
33

44
fn map(_1: Option<Box<()>>) -> Option<Box<()>> {
5-
debug x => _1; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:8: 1:9
6-
let mut _0: std::option::Option<std::boxed::Box<()>>; // return place in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:31: 1:46
7-
- let mut _2: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
8-
- let _3: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:14: 4:15
9-
- let mut _4: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:25: 4:26
10-
- let mut _5: bool; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
11-
- let mut _6: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
12-
- let mut _7: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
5+
debug x => _1; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:8: 3:9
6+
let mut _0: std::option::Option<std::boxed::Box<()>>; // return place in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:31: 3:46
7+
- let mut _2: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
8+
- let _3: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:14: 6:15
9+
- let mut _4: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:25: 6:26
10+
- let mut _5: bool; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
11+
- let mut _6: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
12+
- let mut _7: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
1313
scope 1 {
14-
debug x => ((_0 as Some).0: std::boxed::Box<()>); // in scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:14: 4:15
14+
debug x => ((_0 as Some).0: std::boxed::Box<()>); // in scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:14: 6:15
1515
}
1616

1717
bb0: {
18-
- _5 = const false; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
19-
- _5 = const true; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
20-
- _2 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
21-
_0 = move _1; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:20: 4:27
22-
- _6 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
23-
return; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:2: 6:2
18+
- _5 = const false; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
19+
- _5 = const true; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
20+
- _2 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
21+
_0 = move _1; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:20: 6:27
22+
- _6 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
23+
return; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:2: 8:2
2424
}
2525
}
2626

src/test/mir-opt/simplify_try.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// compile-flags: -Zunsound-mir-opts
12
// EMIT_MIR simplify_try.try_identity.SimplifyArmIdentity.diff
23
// EMIT_MIR simplify_try.try_identity.SimplifyBranchSame.after.mir
34
// EMIT_MIR simplify_try.try_identity.SimplifyLocals.after.mir

src/test/mir-opt/simplify_try.try_identity.DestinationPropagation.diff

+35-35
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@
22
+ // MIR for `try_identity` after DestinationPropagation
33

44
fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
5-
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:6:17: 6:18
6-
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:6:41: 6:57
7-
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:7:9: 7:10
8-
let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:15
9-
let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:14
10-
let mut _5: isize; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
11-
let _6: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
12-
let mut _7: !; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
13-
let mut _8: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
14-
let mut _9: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
15-
let _10: u32; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:15
16-
let mut _11: u32; // in scope 0 at $DIR/simplify_try.rs:8:8: 8:9
5+
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18
6+
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:7:41: 7:57
7+
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:8:9: 8:10
8+
let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:15
9+
let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:14
10+
let mut _5: isize; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
11+
let _6: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
12+
let mut _7: !; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
13+
let mut _8: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
14+
let mut _9: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
15+
let _10: u32; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:15
16+
let mut _11: u32; // in scope 0 at $DIR/simplify_try.rs:9:8: 9:9
1717
scope 1 {
18-
debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:7:9: 7:10
18+
debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:8:9: 8:10
1919
}
2020
scope 2 {
21-
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:7:14: 7:15
21+
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
2222
scope 3 {
2323
scope 7 {
2424
debug t => ((_0 as Err).0: i32); // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
2525
}
2626
scope 8 {
2727
debug v => ((_0 as Err).0: i32); // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
28-
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:7:14: 7:15
28+
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:8:14: 8:15
2929
}
3030
}
3131
}
3232
scope 4 {
33-
debug val => ((_0 as Ok).0: u32); // in scope 4 at $DIR/simplify_try.rs:7:13: 7:15
33+
debug val => ((_0 as Ok).0: u32); // in scope 4 at $DIR/simplify_try.rs:8:13: 8:15
3434
scope 5 {
3535
}
3636
}
@@ -40,33 +40,33 @@
4040
}
4141

4242
bb0: {
43-
StorageLive(_2); // scope 0 at $DIR/simplify_try.rs:7:9: 7:10
44-
- StorageLive(_3); // scope 0 at $DIR/simplify_try.rs:7:13: 7:15
45-
- StorageLive(_4); // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
46-
- _4 = _1; // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
43+
StorageLive(_2); // scope 0 at $DIR/simplify_try.rs:8:9: 8:10
44+
- StorageLive(_3); // scope 0 at $DIR/simplify_try.rs:8:13: 8:15
45+
- StorageLive(_4); // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
46+
- _4 = _1; // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
4747
- _3 = move _4; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
48-
- StorageDead(_4); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
49-
- _5 = discriminant(_3); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
50-
+ nop; // scope 0 at $DIR/simplify_try.rs:7:13: 7:15
51-
+ nop; // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
52-
+ _0 = _1; // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
48+
- StorageDead(_4); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
49+
- _5 = discriminant(_3); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
50+
+ nop; // scope 0 at $DIR/simplify_try.rs:8:13: 8:15
51+
+ nop; // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
52+
+ _0 = _1; // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
5353
+ nop; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
54-
+ nop; // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
55-
+ _5 = discriminant(_0); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
56-
goto -> bb1; // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
54+
+ nop; // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
55+
+ _5 = discriminant(_0); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
56+
goto -> bb1; // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
5757
}
5858

5959
bb1: {
60-
- _0 = move _3; // scope 1 at $DIR/simplify_try.rs:8:5: 8:10
61-
- StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:7:15: 7:16
62-
+ nop; // scope 1 at $DIR/simplify_try.rs:8:5: 8:10
63-
+ nop; // scope 0 at $DIR/simplify_try.rs:7:15: 7:16
64-
StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:9:1: 9:2
65-
goto -> bb2; // scope 0 at $DIR/simplify_try.rs:9:2: 9:2
60+
- _0 = move _3; // scope 1 at $DIR/simplify_try.rs:9:5: 9:10
61+
- StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:8:15: 8:16
62+
+ nop; // scope 1 at $DIR/simplify_try.rs:9:5: 9:10
63+
+ nop; // scope 0 at $DIR/simplify_try.rs:8:15: 8:16
64+
StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:10:1: 10:2
65+
goto -> bb2; // scope 0 at $DIR/simplify_try.rs:10:2: 10:2
6666
}
6767

6868
bb2: {
69-
return; // scope 0 at $DIR/simplify_try.rs:9:2: 9:2
69+
return; // scope 0 at $DIR/simplify_try.rs:10:2: 10:2
7070
}
7171
}
7272

0 commit comments

Comments
 (0)