rust/tests/mir-opt/reference_prop.unique_with_copies.ReferencePropagation.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.3 KiB
Diff
Raw Normal View History

2023-05-10 11:06:41 -05:00
- // MIR for `unique_with_copies` before ReferencePropagation
+ // MIR for `unique_with_copies` after ReferencePropagation
fn unique_with_copies() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let _1: *mut i32;
let mut _2: i32;
let _4: ();
let mut _5: i32;
let _6: ();
let mut _7: i32;
2023-05-10 11:06:41 -05:00
scope 1 {
2023-06-06 08:47:00 -05:00
- debug y => _1;
+ debug y => _3;
2023-05-10 11:06:41 -05:00
}
scope 2 {
2023-06-06 08:47:00 -05:00
debug a => _2;
let _3: *mut i32;
2023-05-10 11:06:41 -05:00
scope 3 {
2023-06-06 08:47:00 -05:00
debug x => _3;
2023-05-10 11:06:41 -05:00
}
}
bb0: {
2023-06-06 08:47:00 -05:00
- StorageLive(_1);
StorageLive(_2);
_2 = const 0_i32;
- StorageLive(_3);
_3 = &raw mut _2;
StorageLive(_4);
StorageLive(_5);
_5 = copy (*_3);
2023-06-23 11:53:09 -05:00
_4 = opaque::<i32>(move _5) -> [return: bb1, unwind continue];
2023-05-10 11:06:41 -05:00
}
bb1: {
2023-06-06 08:47:00 -05:00
StorageDead(_5);
StorageDead(_4);
- _1 = copy _3;
- StorageDead(_3);
StorageDead(_2);
StorageLive(_6);
StorageLive(_7);
- _7 = copy (*_1);
+ _7 = copy (*_3);
2023-06-23 11:53:09 -05:00
_6 = opaque::<i32>(move _7) -> [return: bb2, unwind continue];
2023-05-10 11:06:41 -05:00
}
bb2: {
2023-06-06 08:47:00 -05:00
StorageDead(_7);
StorageDead(_6);
_0 = const ();
- StorageDead(_1);
return;
2023-05-10 11:06:41 -05:00
}
}