rust/tests/mir-opt/enum_opt.cand.EnumSizeOpt.64bit.diff

71 lines
2.0 KiB
Diff
Raw Permalink Normal View History

- // MIR for `cand` before EnumSizeOpt
+ // MIR for `cand` after EnumSizeOpt
2023-02-05 16:14:40 -06:00
fn cand() -> Candidate {
2023-06-06 08:47:00 -05:00
let mut _0: Candidate;
let mut _1: Candidate;
let mut _2: Candidate;
let mut _3: [u8; 8196];
+ let mut _4: [usize; 2];
+ let mut _5: isize;
+ let mut _6: usize;
+ let mut _7: usize;
+ let mut _8: *mut Candidate;
+ let mut _9: *mut u8;
+ let mut _10: *const Candidate;
+ let mut _11: *const u8;
+ let mut _12: [usize; 2];
+ let mut _13: isize;
+ let mut _14: usize;
+ let mut _15: usize;
+ let mut _16: *mut Candidate;
+ let mut _17: *mut u8;
+ let mut _18: *const Candidate;
+ let mut _19: *const u8;
scope 1 {
2023-06-06 08:47:00 -05:00
debug a => _1;
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
_1 = Candidate::Small(const 1_u8);
StorageLive(_2);
StorageLive(_3);
_3 = [const 1_u8; 8196];
_2 = Candidate::Large(move _3);
StorageDead(_3);
- _1 = move _2;
+ StorageLive(_4);
+ _4 = const [2_usize, 8197_usize];
+ _5 = discriminant(_2);
2024-08-18 16:26:34 -05:00
+ _6 = copy _5 as usize (IntToInt);
+ _7 = copy _4[_6];
2023-06-06 08:47:00 -05:00
+ _8 = &raw mut _1;
2024-08-18 16:26:34 -05:00
+ _9 = copy _8 as *mut u8 (PtrToPtr);
2023-06-06 08:47:00 -05:00
+ _10 = &raw const _2;
2024-08-18 16:26:34 -05:00
+ _11 = copy _10 as *const u8 (PtrToPtr);
2023-06-06 08:47:00 -05:00
+ Deinit(_8);
2024-08-18 16:26:34 -05:00
+ copy_nonoverlapping(dst = copy _9, src = copy _11, count = copy _7);
2023-06-06 08:47:00 -05:00
+ StorageDead(_4);
StorageDead(_2);
- _0 = move _1;
+ StorageLive(_12);
+ _12 = const [2_usize, 8197_usize];
+ _13 = discriminant(_1);
2024-08-18 16:26:34 -05:00
+ _14 = copy _13 as usize (IntToInt);
+ _15 = copy _12[_14];
2023-06-06 08:47:00 -05:00
+ _16 = &raw mut _0;
2024-08-18 16:26:34 -05:00
+ _17 = copy _16 as *mut u8 (PtrToPtr);
2023-06-06 08:47:00 -05:00
+ _18 = &raw const _1;
2024-08-18 16:26:34 -05:00
+ _19 = copy _18 as *const u8 (PtrToPtr);
2023-06-06 08:47:00 -05:00
+ Deinit(_16);
2024-08-18 16:26:34 -05:00
+ copy_nonoverlapping(dst = copy _17, src = copy _19, count = copy _15);
2023-06-06 08:47:00 -05:00
+ StorageDead(_12);
StorageDead(_1);
return;
}
}
2024-06-14 18:05:22 -05:00
+
+ ALLOC0 (size: 16, align: 8) { .. }