rust/tests/mir-opt/issues/issue_75439.foo.MatchBranchSimplification.diff

90 lines
4.7 KiB
Diff
Raw Normal View History

- // MIR for `foo` before MatchBranchSimplification
+ // MIR for `foo` after MatchBranchSimplification
fn foo(_1: [u8; 16]) -> Option<[u8; 4]> {
2022-11-02 16:54:49 -05:00
debug bytes => _1; // in scope 0 at $DIR/issue_75439.rs:+0:12: +0:17
let mut _0: std::option::Option<[u8; 4]>; // return place in scope 0 at $DIR/issue_75439.rs:+0:32: +0:47
let _2: [u32; 4]; // in scope 0 at $DIR/issue_75439.rs:+2:9: +2:15
let mut _3: [u8; 16]; // in scope 0 at $DIR/issue_75439.rs:+2:47: +2:52
let mut _5: [u8; 4]; // in scope 0 at $DIR/issue_75439.rs:+5:14: +5:38
let mut _6: u32; // in scope 0 at $DIR/issue_75439.rs:+5:33: +5:35
scope 1 {
2022-11-02 16:54:49 -05:00
debug dwords => _2; // in scope 1 at $DIR/issue_75439.rs:+2:9: +2:15
scope 3 {
2022-11-02 16:54:49 -05:00
debug ip => _4; // in scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
let _4: u32; // in scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
2022-06-10 01:16:56 -05:00
scope 4 {
}
}
}
scope 2 {
}
bb0: {
2022-11-02 16:54:49 -05:00
StorageLive(_2); // scope 0 at $DIR/issue_75439.rs:+2:9: +2:15
StorageLive(_3); // scope 2 at $DIR/issue_75439.rs:+2:47: +2:52
_3 = _1; // scope 2 at $DIR/issue_75439.rs:+2:47: +2:52
_2 = transmute::<[u8; 16], [u32; 4]>(move _3) -> bb1; // scope 2 at $DIR/issue_75439.rs:+2:37: +2:53
// mir::Constant
// + span: $DIR/issue_75439.rs:8:37: 8:46
2022-07-06 09:14:46 -05:00
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn([u8; 16]) -> [u32; 4] {transmute::<[u8; 16], [u32; 4]>}, val: Value(<ZST>) }
}
bb1: {
2022-11-02 16:54:49 -05:00
StorageDead(_3); // scope 2 at $DIR/issue_75439.rs:+2:52: +2:53
switchInt(_2[0 of 4]) -> [0: bb2, otherwise: bb8]; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
}
bb2: {
switchInt(_2[1 of 4]) -> [0: bb3, otherwise: bb8]; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
}
bb3: {
switchInt(_2[2 of 4]) -> [0: bb5, 4294901760: bb6, otherwise: bb8]; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
}
bb4: {
2022-11-02 16:54:49 -05:00
StorageLive(_5); // scope 3 at $DIR/issue_75439.rs:+5:14: +5:38
StorageLive(_6); // scope 4 at $DIR/issue_75439.rs:+5:33: +5:35
_6 = _4; // scope 4 at $DIR/issue_75439.rs:+5:33: +5:35
_5 = transmute::<u32, [u8; 4]>(move _6) -> bb7; // scope 4 at $DIR/issue_75439.rs:+5:23: +5:36
// mir::Constant
// + span: $DIR/issue_75439.rs:11:23: 11:32
2022-07-06 09:14:46 -05:00
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u32) -> [u8; 4] {transmute::<u32, [u8; 4]>}, val: Value(<ZST>) }
}
bb5: {
2022-11-02 16:54:49 -05:00
StorageLive(_4); // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
_4 = _2[3 of 4]; // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
goto -> bb4; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
}
bb6: {
2022-11-02 16:54:49 -05:00
StorageLive(_4); // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
_4 = _2[3 of 4]; // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
goto -> bb4; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
}
bb7: {
2022-11-02 16:54:49 -05:00
StorageDead(_6); // scope 4 at $DIR/issue_75439.rs:+5:35: +5:36
Deinit(_0); // scope 3 at $DIR/issue_75439.rs:+5:9: +5:39
((_0 as Some).0: [u8; 4]) = move _5; // scope 3 at $DIR/issue_75439.rs:+5:9: +5:39
discriminant(_0) = 1; // scope 3 at $DIR/issue_75439.rs:+5:9: +5:39
StorageDead(_5); // scope 3 at $DIR/issue_75439.rs:+5:38: +5:39
StorageDead(_4); // scope 1 at $DIR/issue_75439.rs:+6:5: +6:6
goto -> bb9; // scope 1 at $DIR/issue_75439.rs:+4:5: +8:6
}
bb8: {
2022-11-02 16:54:49 -05:00
Deinit(_0); // scope 1 at $DIR/issue_75439.rs:+7:9: +7:13
discriminant(_0) = 0; // scope 1 at $DIR/issue_75439.rs:+7:9: +7:13
goto -> bb9; // scope 1 at $DIR/issue_75439.rs:+4:5: +8:6
}
bb9: {
2022-11-02 16:54:49 -05:00
StorageDead(_2); // scope 0 at $DIR/issue_75439.rs:+9:1: +9:2
return; // scope 0 at $DIR/issue_75439.rs:+9:2: +9:2
}
}