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

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

70 lines
3.7 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.rs:8:11: 8:11
let mut _1: std::option::Option<Empty>; // in scope 0 at $DIR/unreachable.rs:9:23: 9:30
let mut _2: isize; // in scope 0 at $DIR/unreachable.rs:9:12: 9:20
let _5: (); // in scope 0 at $DIR/unreachable.rs:12:9: 16:10
let mut _6: bool; // in scope 0 at $DIR/unreachable.rs:12:12: 12:16
let mut _7: !; // in scope 0 at $DIR/unreachable.rs:18:9: 18:21
scope 1 {
debug _x => _3; // in scope 1 at $DIR/unreachable.rs:9:17: 9:19
let _3: Empty; // in scope 1 at $DIR/unreachable.rs:9:17: 9:19
2022-06-10 06:16:56 +00:00
let mut _4: i32; // in scope 1 at $DIR/unreachable.rs:10:13: 10:19
scope 2 {
debug _y => _4; // in scope 2 at $DIR/unreachable.rs:10:13: 10:19
}
2020-04-02 21:09:01 +00:00
}
bb0: {
StorageLive(_1); // scope 1 at $DIR/unreachable.rs:9:23: 9:30
_1 = empty() -> bb1; // scope 1 at $DIR/unreachable.rs:9:23: 9:30
2020-04-02 21:09:01 +00:00
// mir::Constant
// + span: $DIR/unreachable.rs:9:23: 9:28
2022-07-06 14:14:46 +00:00
// + literal: Const { ty: fn() -> Option<Empty> {empty}, val: Value(<ZST>) }
2020-04-02 21:09:01 +00:00
}
bb1: {
_2 = discriminant(_1); // scope 1 at $DIR/unreachable.rs:9:12: 9:20
- switchInt(move _2) -> [1_isize: bb2, otherwise: bb6]; // scope 1 at $DIR/unreachable.rs:9:12: 9:20
+ goto -> bb2; // scope 1 at $DIR/unreachable.rs:9:12: 9:20
2020-04-02 21:09:01 +00:00
}
bb2: {
- StorageLive(_3); // scope 1 at $DIR/unreachable.rs:9:17: 9:19
- _3 = move ((_1 as Some).0: Empty); // scope 1 at $DIR/unreachable.rs:9:17: 9:19
2022-06-10 06:16:56 +00:00
- StorageLive(_4); // scope 1 at $DIR/unreachable.rs:10:13: 10:19
- StorageLive(_5); // scope 2 at $DIR/unreachable.rs:12:9: 16:10
2022-06-10 21:12:58 +00:00
- StorageLive(_6); // scope 2 at $DIR/unreachable.rs:12:12: 12:16
- _6 = const true; // scope 2 at $DIR/unreachable.rs:12:12: 12:16
- switchInt(move _6) -> [false: bb4, otherwise: bb3]; // scope 2 at $DIR/unreachable.rs:12:12: 12:16
2020-04-02 21:09:01 +00:00
- }
-
- bb3: {
2022-06-10 21:12:58 +00:00
- _4 = const 21_i32; // scope 2 at $DIR/unreachable.rs:13:13: 13:20
- _5 = const (); // scope 2 at $DIR/unreachable.rs:12:17: 14:10
- goto -> bb5; // scope 2 at $DIR/unreachable.rs:12:9: 16:10
2020-04-02 21:09:01 +00:00
- }
-
- bb4: {
2021-01-01 18:38:11 +00:00
- _4 = const 42_i32; // scope 2 at $DIR/unreachable.rs:15:13: 15:20
- _5 = const (); // scope 2 at $DIR/unreachable.rs:14:16: 16:10
- goto -> bb5; // scope 2 at $DIR/unreachable.rs:12:9: 16:10
2020-04-02 21:09:01 +00:00
- }
-
- bb5: {
- StorageDead(_6); // scope 2 at $DIR/unreachable.rs:16:9: 16:10
- StorageDead(_5); // scope 2 at $DIR/unreachable.rs:16:9: 16:10
- StorageLive(_7); // scope 2 at $DIR/unreachable.rs:18:9: 18:21
- unreachable; // scope 2 at $DIR/unreachable.rs:18:15: 18:17
- }
-
- bb6: {
_0 = const (); // scope 0 at $DIR/unreachable.rs:19:6: 19:6
StorageDead(_1); // scope 0 at $DIR/unreachable.rs:20:1: 20:2
return; // scope 0 at $DIR/unreachable.rs:20:2: 20:2
2020-04-02 21:09:01 +00:00
}
}