2020-08-16 10:44:53 +02:00
|
|
|
// MIR for `main` after SimplifyCfg-promote-consts
|
2020-04-02 21:09:01 +00:00
|
|
|
|
|
|
|
fn main() -> () {
|
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/loop_test.rs:6:11: 6:11
|
|
|
|
let _1: (); // in scope 0 at $DIR/loop_test.rs:10:5: 12:6
|
|
|
|
let mut _2: bool; // in scope 0 at $DIR/loop_test.rs:10:8: 10:12
|
|
|
|
let mut _3: !; // in scope 0 at $DIR/loop_test.rs:10:13: 12:6
|
|
|
|
let mut _4: !; // in scope 0 at $DIR/loop_test.rs:13:5: 16:6
|
|
|
|
let mut _5: (); // in scope 0 at $DIR/loop_test.rs:6:1: 17:2
|
|
|
|
let _6: i32; // in scope 0 at $DIR/loop_test.rs:14:13: 14:14
|
|
|
|
scope 1 {
|
|
|
|
debug x => _6; // in scope 1 at $DIR/loop_test.rs:14:13: 14:14
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2020-04-25 11:01:43 +02:00
|
|
|
StorageLive(_1); // scope 0 at $DIR/loop_test.rs:10:5: 12:6
|
|
|
|
StorageLive(_2); // scope 0 at $DIR/loop_test.rs:10:8: 10:12
|
|
|
|
_2 = const true; // scope 0 at $DIR/loop_test.rs:10:8: 10:12
|
2021-09-01 22:52:17 +01:00
|
|
|
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/loop_test.rs:10:8: 10:12
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
2020-10-02 16:11:24 -04:00
|
|
|
bb1: {
|
2021-01-01 15:38:11 -03:00
|
|
|
_0 = const (); // scope 0 at $DIR/loop_test.rs:11:9: 11:15
|
|
|
|
StorageDead(_2); // scope 0 at $DIR/loop_test.rs:12:5: 12:6
|
|
|
|
StorageDead(_1); // scope 0 at $DIR/loop_test.rs:12:5: 12:6
|
|
|
|
return; // scope 0 at $DIR/loop_test.rs:17:2: 17:2
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2020-11-30 23:58:08 -08:00
|
|
|
_1 = const (); // scope 0 at $DIR/loop_test.rs:12:6: 12:6
|
2020-04-25 11:01:43 +02:00
|
|
|
StorageDead(_2); // scope 0 at $DIR/loop_test.rs:12:5: 12:6
|
|
|
|
StorageDead(_1); // scope 0 at $DIR/loop_test.rs:12:5: 12:6
|
|
|
|
StorageLive(_4); // scope 0 at $DIR/loop_test.rs:13:5: 16:6
|
2021-01-01 15:38:11 -03:00
|
|
|
goto -> bb3; // scope 0 at $DIR/loop_test.rs:13:5: 16:6
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
2020-10-02 16:11:24 -04:00
|
|
|
bb3: {
|
2021-01-01 15:38:11 -03:00
|
|
|
falseUnwind -> [real: bb4, cleanup: bb5]; // scope 0 at $DIR/loop_test.rs:13:5: 16:6
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
2020-10-02 16:11:24 -04:00
|
|
|
bb4: {
|
2020-04-25 11:01:43 +02:00
|
|
|
StorageLive(_6); // scope 0 at $DIR/loop_test.rs:14:13: 14:14
|
2020-06-19 18:57:15 +02:00
|
|
|
_6 = const 1_i32; // scope 0 at $DIR/loop_test.rs:14:17: 14:18
|
2021-03-25 23:03:12 -04:00
|
|
|
FakeRead(ForLet(None), _6); // scope 0 at $DIR/loop_test.rs:14:13: 14:14
|
2020-04-25 11:01:43 +02:00
|
|
|
StorageDead(_6); // scope 0 at $DIR/loop_test.rs:16:5: 16:6
|
2021-06-09 00:00:00 +00:00
|
|
|
goto -> bb3; // scope 0 at no-location
|
2020-10-02 16:11:24 -04:00
|
|
|
}
|
|
|
|
|
2021-01-01 15:38:11 -03:00
|
|
|
bb5 (cleanup): {
|
2020-10-02 16:11:24 -04:00
|
|
|
resume; // scope 0 at $DIR/loop_test.rs:6:1: 17:2
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
}
|