rust/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff

86 lines
5.3 KiB
Diff
Raw Normal View History

2020-04-02 21:09:01 +00:00
- // MIR for `main` before UnreachablePropagation
+ // MIR for `main` after UnreachablePropagation
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/unreachable_diverging.rs:12:11: 12:11
let _1: bool; // in scope 0 at $DIR/unreachable_diverging.rs:13:9: 13:10
let mut _2: std::option::Option<Empty>; // in scope 0 at $DIR/unreachable_diverging.rs:14:25: 14:32
let mut _3: isize; // in scope 0 at $DIR/unreachable_diverging.rs:14:12: 14:22
let _5: (); // in scope 0 at $DIR/unreachable_diverging.rs:15:9: 17:10
let mut _6: bool; // in scope 0 at $DIR/unreachable_diverging.rs:15:12: 15:13
let mut _7: !; // in scope 0 at $DIR/unreachable_diverging.rs:18:9: 18:22
scope 1 {
debug x => _1; // in scope 1 at $DIR/unreachable_diverging.rs:13:9: 13:10
let _4: Empty; // in scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21
scope 2 {
debug bomb => _4; // in scope 2 at $DIR/unreachable_diverging.rs:14:17: 14:21
}
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/unreachable_diverging.rs:13:9: 13:10
_1 = const true; // scope 0 at $DIR/unreachable_diverging.rs:13:13: 13:17
StorageLive(_2); // scope 1 at $DIR/unreachable_diverging.rs:14:25: 14:32
_2 = const empty() -> bb1; // scope 1 at $DIR/unreachable_diverging.rs:14:25: 14:32
2020-04-02 21:09:01 +00:00
// mir::Constant
// + span: $DIR/unreachable_diverging.rs:14:25: 14:30
// + literal: Const { ty: fn() -> std::option::Option<Empty> {empty}, val: Value(Scalar(<ZST>)) }
}
bb1: {
_3 = discriminant(_2); // scope 1 at $DIR/unreachable_diverging.rs:14:12: 14:22
switchInt(move _3) -> [1_isize: bb3, otherwise: bb2]; // scope 1 at $DIR/unreachable_diverging.rs:14:12: 14:22
2020-04-02 21:09:01 +00:00
}
bb2: {
_0 = const (); // scope 1 at $DIR/unreachable_diverging.rs:14:5: 19:6
2020-04-09 12:58:36 +02:00
// ty::Const
// + ty: ()
// + val: Value(Scalar(<ZST>))
// mir::Constant
// + span: $DIR/unreachable_diverging.rs:14:5: 19:6
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
StorageDead(_1); // scope 0 at $DIR/unreachable_diverging.rs:20:1: 20:2
StorageDead(_2); // scope 0 at $DIR/unreachable_diverging.rs:20:1: 20:2
return; // scope 0 at $DIR/unreachable_diverging.rs:20:2: 20:2
2020-04-02 21:09:01 +00:00
}
bb3: {
StorageLive(_4); // scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21
_4 = move ((_2 as Some).0: Empty); // scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21
StorageLive(_5); // scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10
StorageLive(_6); // scope 2 at $DIR/unreachable_diverging.rs:15:12: 15:13
_6 = _1; // scope 2 at $DIR/unreachable_diverging.rs:15:12: 15:13
- switchInt(_6) -> [false: bb4, otherwise: bb5]; // scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10
+ goto -> bb4; // scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10
2020-04-02 21:09:01 +00:00
}
bb4: {
- _5 = const (); // scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10
- // ty::Const
2020-04-09 12:58:36 +02:00
- // + ty: ()
- // + val: Value(Scalar(<ZST>))
+ _5 = const loop_forever() -> bb5; // scope 2 at $DIR/unreachable_diverging.rs:16:13: 16:27
// mir::Constant
2020-04-09 12:58:36 +02:00
- // + span: $DIR/unreachable_diverging.rs:15:9: 17:10
- // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
- goto -> bb6; // scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10
2020-04-02 21:09:01 +00:00
- }
-
- bb5: {
- _5 = const loop_forever() -> bb6; // scope 2 at $DIR/unreachable_diverging.rs:16:13: 16:27
- // mir::Constant
2020-04-02 21:09:01 +00:00
// + span: $DIR/unreachable_diverging.rs:16:13: 16:25
// + literal: Const { ty: fn() {loop_forever}, val: Value(Scalar(<ZST>)) }
}
- bb6: {
+ bb5: {
StorageDead(_6); // scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10
StorageDead(_5); // scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10
StorageLive(_7); // scope 2 at $DIR/unreachable_diverging.rs:18:9: 18:22
unreachable; // scope 2 at $DIR/unreachable_diverging.rs:18:15: 18:19
2020-04-02 21:09:01 +00:00
}
}