2024-05-12 02:22:42 -05:00
|
|
|
- // MIR for `meta_of_ref_to_slice` before GVN
|
|
|
|
+ // MIR for `meta_of_ref_to_slice` after GVN
|
|
|
|
|
|
|
|
fn meta_of_ref_to_slice(_1: *const i32) -> usize {
|
|
|
|
debug x => _1;
|
|
|
|
let mut _0: usize;
|
|
|
|
let _2: *const [i32];
|
|
|
|
let mut _3: *const i32;
|
|
|
|
let mut _4: *const [i32];
|
|
|
|
scope 1 {
|
|
|
|
debug ptr => _2;
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
|
|
|
- StorageLive(_2);
|
|
|
|
+ nop;
|
|
|
|
StorageLive(_3);
|
2024-08-18 16:26:34 -05:00
|
|
|
_3 = copy _1;
|
2024-05-12 02:22:42 -05:00
|
|
|
- _2 = *const [i32] from (move _3, const 1_usize);
|
2024-08-18 16:26:34 -05:00
|
|
|
+ _2 = *const [i32] from (copy _1, const 1_usize);
|
2024-05-12 02:22:42 -05:00
|
|
|
StorageDead(_3);
|
|
|
|
StorageLive(_4);
|
2024-08-18 16:26:34 -05:00
|
|
|
_4 = copy _2;
|
2024-05-12 02:22:42 -05:00
|
|
|
- _0 = PtrMetadata(move _4);
|
|
|
|
+ _0 = const 1_usize;
|
|
|
|
StorageDead(_4);
|
|
|
|
- StorageDead(_2);
|
|
|
|
+ nop;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|