rust/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff
2023-12-07 17:46:36 +01:00

132 lines
3.0 KiB
Diff

- // MIR for `statics` before DataflowConstProp
+ // MIR for `statics` after DataflowConstProp
fn statics() -> () {
let mut _0: ();
let _1: E;
let mut _2: &E;
let mut _4: isize;
let mut _8: &&E;
let mut _10: isize;
scope 1 {
debug e => _1;
let _3: i32;
let _5: i32;
let _6: i32;
scope 2 {
debug x => _3;
let _7: &E;
scope 5 {
debug e => _7;
let _9: &i32;
let _11: &i32;
let _12: &i32;
scope 6 {
debug x => _9;
}
scope 7 {
debug x => _11;
}
scope 8 {
debug x => _12;
}
}
}
scope 3 {
debug x => _5;
}
scope 4 {
debug x => _6;
}
}
bb0: {
StorageLive(_1);
StorageLive(_2);
_2 = const {ALLOC1: &E};
- _1 = (*_2);
+ _1 = const E::V1(0_i32);
StorageDead(_2);
StorageLive(_3);
- _4 = discriminant(_1);
- switchInt(move _4) -> [0: bb3, 1: bb1, otherwise: bb2];
+ _4 = const 0_isize;
+ switchInt(const 0_isize) -> [0: bb3, 1: bb1, otherwise: bb2];
}
bb1: {
StorageLive(_6);
_6 = ((_1 as V2).0: i32);
_3 = _6;
StorageDead(_6);
goto -> bb4;
}
bb2: {
unreachable;
}
bb3: {
StorageLive(_5);
- _5 = ((_1 as V1).0: i32);
- _3 = _5;
+ _5 = const 0_i32;
+ _3 = const 0_i32;
StorageDead(_5);
goto -> bb4;
}
bb4: {
StorageLive(_7);
StorageLive(_8);
_8 = const {ALLOC2: &&E};
_7 = (*_8);
StorageDead(_8);
StorageLive(_9);
_10 = discriminant((*_7));
switchInt(move _10) -> [0: bb6, 1: bb5, otherwise: bb2];
}
bb5: {
StorageLive(_12);
_12 = &(((*_7) as V2).0: i32);
_9 = &(*_12);
StorageDead(_12);
goto -> bb7;
}
bb6: {
StorageLive(_11);
_11 = &(((*_7) as V1).0: i32);
_9 = _11;
StorageDead(_11);
goto -> bb7;
}
bb7: {
_0 = const ();
StorageDead(_9);
StorageDead(_7);
StorageDead(_3);
StorageDead(_1);
return;
}
+ }
+
+ ALLOC3 (size: 8, align: 4) {
+ 00 00 00 00 00 00 00 00 │ ........
}
ALLOC2 (static: RC, size: 8, align: 8) {
╾ALLOC0<imm>╼ │ ╾──────╼
}
ALLOC0 (size: 8, align: 4) {
01 00 00 00 04 00 00 00 │ ........
}
ALLOC1 (static: statics::C, size: 8, align: 4) {
00 00 00 00 00 00 00 00 │ ........
}