Skip to content

Commit

Permalink
change inline_retag to after.mir
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehri01 committed Oct 31, 2023
1 parent 1ec10ec commit 2fcb4d9
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 66 deletions.
59 changes: 59 additions & 0 deletions tests/mir-opt/inline/inline_retag.bar.Inline.after.mir
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// MIR for `bar` after Inline

fn bar() -> bool {
let mut _0: bool;
let _1: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo};
let mut _2: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo};
let mut _3: &i32;
let _4: &i32;
let _5: i32;
let mut _6: &i32;
let _7: &i32;
let _8: i32;
scope 1 {
debug f => _1;
let mut _9: &i32;
let mut _10: &i32;
scope 2 (inlined foo) {
debug x => _3;
debug y => _6;
let mut _11: i32;
let mut _12: i32;
}
}

bb0: {
StorageLive(_1);
_1 = foo;
StorageLive(_2);
_2 = _1;
StorageLive(_3);
StorageLive(_4);
_10 = const _;
Retag(_10);
_4 = &(*_10);
_3 = &(*_4);
StorageLive(_6);
StorageLive(_7);
_9 = const _;
Retag(_9);
_7 = &(*_9);
_6 = &(*_7);
Retag(_3);
Retag(_6);
StorageLive(_11);
_11 = (*_3);
StorageLive(_12);
_12 = (*_6);
_0 = Eq(move _11, move _12);
StorageDead(_12);
StorageDead(_11);
StorageDead(_6);
StorageDead(_3);
StorageDead(_2);
StorageDead(_1);
StorageDead(_7);
StorageDead(_4);
return;
}
}
65 changes: 0 additions & 65 deletions tests/mir-opt/inline/inline_retag.bar.Inline.diff

This file was deleted.

2 changes: 1 addition & 1 deletion tests/mir-opt/inline/inline_retag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fn main() {
println!("{}", bar());
}

// EMIT_MIR inline_retag.bar.Inline.diff
// EMIT_MIR inline_retag.bar.Inline.after.mir
fn bar() -> bool {
// CHECK-LABEL: fn bar(
// CHECK: (inlined foo)
Expand Down

0 comments on commit 2fcb4d9

Please sign in to comment.