Skip to content

Commit 2fcb4d9

Browse files
committed
change inline_retag to after.mir
1 parent 1ec10ec commit 2fcb4d9

File tree

3 files changed

+60
-66
lines changed

3 files changed

+60
-66
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// MIR for `bar` after Inline
2+
3+
fn bar() -> bool {
4+
let mut _0: bool;
5+
let _1: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo};
6+
let mut _2: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo};
7+
let mut _3: &i32;
8+
let _4: &i32;
9+
let _5: i32;
10+
let mut _6: &i32;
11+
let _7: &i32;
12+
let _8: i32;
13+
scope 1 {
14+
debug f => _1;
15+
let mut _9: &i32;
16+
let mut _10: &i32;
17+
scope 2 (inlined foo) {
18+
debug x => _3;
19+
debug y => _6;
20+
let mut _11: i32;
21+
let mut _12: i32;
22+
}
23+
}
24+
25+
bb0: {
26+
StorageLive(_1);
27+
_1 = foo;
28+
StorageLive(_2);
29+
_2 = _1;
30+
StorageLive(_3);
31+
StorageLive(_4);
32+
_10 = const _;
33+
Retag(_10);
34+
_4 = &(*_10);
35+
_3 = &(*_4);
36+
StorageLive(_6);
37+
StorageLive(_7);
38+
_9 = const _;
39+
Retag(_9);
40+
_7 = &(*_9);
41+
_6 = &(*_7);
42+
Retag(_3);
43+
Retag(_6);
44+
StorageLive(_11);
45+
_11 = (*_3);
46+
StorageLive(_12);
47+
_12 = (*_6);
48+
_0 = Eq(move _11, move _12);
49+
StorageDead(_12);
50+
StorageDead(_11);
51+
StorageDead(_6);
52+
StorageDead(_3);
53+
StorageDead(_2);
54+
StorageDead(_1);
55+
StorageDead(_7);
56+
StorageDead(_4);
57+
return;
58+
}
59+
}

tests/mir-opt/inline/inline_retag.bar.Inline.diff

-65
This file was deleted.

tests/mir-opt/inline/inline_retag.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ fn main() {
66
println!("{}", bar());
77
}
88

9-
// EMIT_MIR inline_retag.bar.Inline.diff
9+
// EMIT_MIR inline_retag.bar.Inline.after.mir
1010
fn bar() -> bool {
1111
// CHECK-LABEL: fn bar(
1212
// CHECK: (inlined foo)

0 commit comments

Comments
 (0)