rust/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff

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

125 lines
2.9 KiB
Diff
Raw Permalink Normal View History

2023-05-13 09:19:31 -05:00
- // 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 {
2024-01-08 00:03:42 -06:00
debug e1 => _1;
2023-05-13 09:19:31 -05:00
let _3: i32;
let _5: i32;
let _6: i32;
scope 2 {
2024-01-08 00:03:42 -06:00
debug x1 => _3;
2023-05-13 09:19:31 -05:00
let _7: &E;
scope 5 {
2024-01-08 00:03:42 -06:00
debug e2 => _7;
2023-05-13 09:19:31 -05:00
let _9: &i32;
let _11: &i32;
let _12: &i32;
scope 6 {
2024-01-08 00:03:42 -06:00
debug x2 => _9;
2023-05-13 09:19:31 -05:00
}
scope 7 {
2024-01-08 00:03:42 -06:00
debug x21 => _11;
2023-05-13 09:19:31 -05:00
}
scope 8 {
2024-01-08 00:03:42 -06:00
debug x22 => _12;
2023-05-13 09:19:31 -05:00
}
}
}
scope 3 {
2024-01-08 00:03:42 -06:00
debug x11 => _5;
2023-05-13 09:19:31 -05:00
}
scope 4 {
2024-01-08 00:03:42 -06:00
debug x12 => _6;
2023-05-13 09:19:31 -05:00
}
}
bb0: {
StorageLive(_1);
StorageLive(_2);
2024-06-14 18:05:22 -05:00
_2 = const {ALLOC0: &E};
- _1 = copy (*_2);
2023-09-17 04:35:06 -05:00
+ _1 = const E::V1(0_i32);
2023-05-13 09:19:31 -05:00
StorageDead(_2);
StorageLive(_3);
- _4 = discriminant(_1);
2024-02-11 21:56:03 -06:00
- switchInt(move _4) -> [0: bb3, 1: bb2, otherwise: bb1];
2023-05-13 09:19:31 -05:00
+ _4 = const 0_isize;
2024-02-11 21:56:03 -06:00
+ switchInt(const 0_isize) -> [0: bb3, 1: bb2, otherwise: bb1];
2023-05-13 09:19:31 -05:00
}
bb1: {
2024-02-11 21:56:03 -06:00
unreachable;
}
bb2: {
2023-05-13 09:19:31 -05:00
StorageLive(_6);
_6 = copy ((_1 as V2).0: i32);
_3 = copy _6;
StorageDead(_6);
goto -> bb4;
}
bb3: {
StorageLive(_5);
- _5 = copy ((_1 as V1).0: i32);
- _3 = copy _5;
+ _5 = const 0_i32;
+ _3 = const 0_i32;
StorageDead(_5);
goto -> bb4;
}
bb4: {
StorageLive(_7);
StorageLive(_8);
2024-06-14 18:05:22 -05:00
_8 = const {ALLOC1: &&E};
2023-05-13 09:19:31 -05:00
_7 = copy (*_8);
StorageDead(_8);
StorageLive(_9);
_10 = discriminant((*_7));
2024-02-11 21:56:03 -06:00
switchInt(move _10) -> [0: bb6, 1: bb5, otherwise: bb1];
2023-05-13 09:19:31 -05:00
}
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 = copy _11;
StorageDead(_11);
goto -> bb7;
}
bb7: {
_0 = const ();
StorageDead(_9);
StorageDead(_7);
StorageDead(_3);
StorageDead(_1);
return;
}
}
2024-06-14 18:05:22 -05:00
+ ALLOC2 (size: 8, align: 4) { .. }
+
ALLOC1 (static: RC, size: 4, align: 4) { .. }
2023-05-13 09:19:31 -05:00
2024-06-14 18:05:22 -05:00
- ALLOC2 (size: 8, align: 4) { .. }
+ ALLOC3 (size: 8, align: 4) { .. }
2023-05-13 09:19:31 -05:00
2024-06-14 18:05:22 -05:00
ALLOC0 (static: statics::C, size: 8, align: 4) { .. }
2023-05-13 09:19:31 -05:00