rust/tests/mir-opt/simplify_match.main.ConstProp.diff

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

40 lines
2.0 KiB
Diff
Raw Normal View History

- // MIR for `main` before ConstProp
+ // MIR for `main` after ConstProp
2020-04-02 16:09:01 -05:00
fn main() -> () {
2022-07-27 13:47:42 -05:00
let mut _0: (); // return place in scope 0 at $DIR/simplify_match.rs:+0:11: +0:11
let mut _1: bool; // in scope 0 at $DIR/simplify_match.rs:+1:11: +1:31
let _2: bool; // in scope 0 at $DIR/simplify_match.rs:+1:17: +1:18
2020-04-02 16:09:01 -05:00
scope 1 {
2022-07-27 13:47:42 -05:00
debug x => _2; // in scope 1 at $DIR/simplify_match.rs:+1:17: +1:18
2020-04-02 16:09:01 -05:00
}
bb0: {
2022-07-27 13:47:42 -05:00
StorageLive(_1); // scope 0 at $DIR/simplify_match.rs:+1:11: +1:31
StorageLive(_2); // scope 0 at $DIR/simplify_match.rs:+1:17: +1:18
_2 = const false; // scope 0 at $DIR/simplify_match.rs:+1:21: +1:26
- _1 = _2; // scope 1 at $DIR/simplify_match.rs:+1:28: +1:29
+ _1 = const false; // scope 1 at $DIR/simplify_match.rs:+1:28: +1:29
StorageDead(_2); // scope 0 at $DIR/simplify_match.rs:+1:30: +1:31
- switchInt(_1) -> [0: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_match.rs:+1:5: +1:31
+ switchInt(const false) -> [0: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_match.rs:+1:5: +1:31
2020-04-02 16:09:01 -05:00
}
bb1: {
2022-07-27 13:47:42 -05:00
goto -> bb3; // scope 0 at $DIR/simplify_match.rs:+3:18: +3:20
2020-04-02 16:09:01 -05:00
}
bb2: {
2022-07-27 13:47:42 -05:00
_0 = noop() -> bb3; // scope 0 at $DIR/simplify_match.rs:+2:17: +2:23
2020-04-02 16:09:01 -05:00
// mir::Constant
// + span: $DIR/simplify_match.rs:7:17: 7:21
2022-07-06 09:14:46 -05:00
// + literal: Const { ty: fn() {noop}, val: Value(<ZST>) }
2020-04-02 16:09:01 -05:00
}
bb3: {
2022-07-27 13:47:42 -05:00
StorageDead(_1); // scope 0 at $DIR/simplify_match.rs:+5:1: +5:2
return; // scope 0 at $DIR/simplify_match.rs:+5:2: +5:2
2020-04-02 16:09:01 -05:00
}
}